updated to readme
This commit is contained in:
@@ -387,7 +387,6 @@ class LoadCoopManagerTestCase(APITestCase):
|
||||
def setUp(self):
|
||||
"""Tests setup
|
||||
"""
|
||||
self.url = 'http://127.0.0.1:8000/api/v1/load_coops/'
|
||||
self.endpoint = '/api/v1/load_coops/'
|
||||
self.user_factory = factories.CustomUserFactory
|
||||
self.user_model = models.CustomUser
|
||||
@@ -417,7 +416,7 @@ class LoadCoopManagerTestCase(APITestCase):
|
||||
self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {token['access']}")
|
||||
|
||||
# send in request
|
||||
response = self.client.post(self.url, files)
|
||||
response = self.client.post(self.endpoint, files)
|
||||
|
||||
# check re sponse
|
||||
self.assertEqual(response.status_code, 200)
|
||||
@@ -437,7 +436,7 @@ class LoadCoopManagerTestCase(APITestCase):
|
||||
self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {token['access']}")
|
||||
|
||||
# send in request
|
||||
response = self.client.post(self.url, files)
|
||||
response = self.client.post(self.endpoint, files)
|
||||
|
||||
# check response
|
||||
self.assertEqual(response.status_code, 403)
|
||||
@@ -453,7 +452,7 @@ class LoadCoopManagerTestCase(APITestCase):
|
||||
files = {'csv_file': open(self.csv_path,'r')}
|
||||
|
||||
# send in request
|
||||
response = self.client.post(self.url, files)
|
||||
response = self.client.post(self.endpoint, files)
|
||||
|
||||
# check response
|
||||
self.assertEqual(response.status_code, 401)
|
||||
|
||||
Reference in New Issue
Block a user