improvements to csv product loading

This commit is contained in:
Sam
2021-03-03 10:41:34 +00:00
parent 794250a6ab
commit ddf7aee312
4 changed files with 25 additions and 24 deletions

View File

@@ -434,11 +434,10 @@ class LoadCoopProductsTestCase(APITestCase):
# send in request
response = self.client.post(self.endpoint, files)
# check response
self.assertEqual(response.status_code, 200)
# check for object creation
self.assertEquals(5, self.model.objects.count())
self.assertEquals(9, self.model.objects.count())
def test_auth_user_with_no_company_cannot_load_csv(self):
# delete existing instances
@@ -455,7 +454,7 @@ class LoadCoopProductsTestCase(APITestCase):
response = self.client.post(self.endpoint, files)
# check response
self.assertEqual(response.status_code, 200)
self.assertEqual(response.status_code, 406)
# check for object creation
self.assertEqual(0, self.model.objects.count())