work on product csv loading
This commit is contained in:
@@ -421,6 +421,9 @@ class LoadCoopProductsTestCase(APITestCase):
|
||||
|
||||
# create company
|
||||
company = CompanyFactory(creator=self.user)
|
||||
# link with user
|
||||
self.user.company = company
|
||||
self.user.save()
|
||||
|
||||
# read csv file
|
||||
files = {'csv_file': open(self.csv_path,'rt')}
|
||||
@@ -431,8 +434,9 @@ class LoadCoopProductsTestCase(APITestCase):
|
||||
|
||||
# send in request
|
||||
response = self.client.post(self.endpoint, files)
|
||||
import ipdb; ipdb.set_trace()
|
||||
|
||||
# check re sponse
|
||||
# check response
|
||||
self.assertEqual(response.status_code, 200)
|
||||
# check for object creation
|
||||
self.assertEquals(5, self.model.objects.count())
|
||||
|
||||
Reference in New Issue
Block a user