added test for product load

This commit is contained in:
Sam
2021-02-03 12:33:32 +00:00
parent 05fa09a8f3
commit b7ab7eb5d3
3 changed files with 77 additions and 2 deletions

View File

@@ -405,12 +405,11 @@ class LoadCoopManagerTestCase(APITestCase):
self.csv_path = 'datasets/test_coop.csv'
def test_admin_can_load_csv(self):
# delete all instances
# count existing instances
company_count = self.company_model.objects.count()
user_count = self.user_model.objects.count()
# read csv file
csv_file = 'datasets/test_coop.csv'
files = {'csv_file': open(self.csv_path,'rt')}
# Authenticate