

def test_submit_csv_and_rollback(self):
    count = Instance.objects.count()
    csv_import.submit_csv(self.user.username, self.xform, self.good_csv)
    self.assertEqual(Instance.objects.count(), (count + 9), 'submit_csv test Failed!')
    self.assertEqual(Instance.objects.filter(user=self.user).count(), (count + 8), 'submit_csv username check failed!')

dataset/ETHPy150Open kobotoolbox/kobocat/onadata/libs/tests/utils/test_csv_import.py CSVImportTestCase.test_submit_csv_and_rollback/original