@@ -67,29 +67,6 @@ def create_with_dates(self, **kwargs):
67
67
** kwargs ,
68
68
)
69
69
70
- def test_api_token_authentication (self ):
71
- # Reset the pre-set credentials
72
- self .csrf_client .credentials ()
73
-
74
- response = self .client .get (self .scan_list_url )
75
- self .assertEqual (status .HTTP_401_UNAUTHORIZED , response .status_code )
76
-
77
- auth = ""
78
- response = self .csrf_client .get (self .scan_list_url , HTTP_AUTHORIZATION = auth )
79
- self .assertEqual (status .HTTP_401_UNAUTHORIZED , response .status_code )
80
-
81
- auth = self .header_prefix
82
- response = self .csrf_client .get (self .scan_list_url , HTTP_AUTHORIZATION = auth )
83
- self .assertEqual (status .HTTP_401_UNAUTHORIZED , response .status_code )
84
-
85
- auth = self .header_prefix + "bad_token"
86
- response = self .csrf_client .get (self .scan_list_url , HTTP_AUTHORIZATION = auth )
87
- self .assertEqual (status .HTTP_401_UNAUTHORIZED , response .status_code )
88
-
89
- auth = self .header_prefix + self .token .key
90
- response = self .csrf_client .get (self .scan_list_url , HTTP_AUTHORIZATION = auth )
91
- self .assertEqual (status .HTTP_200_OK , response .status_code )
92
-
93
70
def test_api_scan_list_endpoint_results (self ):
94
71
response = self .csrf_client .get (self .scan_list_url )
95
72
self .assertContains (response , self .scan1_detail_url )
0 commit comments