def test_raise_error_in_process_row(self): row = ['test1', 'test2', 'test3'] values = ['test1', 'test2', 'test3', 'test3', 'test3', 'test3'] base = BaseImporter() base.fields = [] self.assertRaises(TypeError, base.process_row(row, values), 'Invalid Line: 2')
def test_ignore_empty_lines(self): base = BaseImporter() row = ['test1', 'test2', 'test3'] values = [False, False, False] base.fields = row base.Meta.ignore_empty_lines = True self.assertFalse(base.process_row(row, values))
def test_raise_error_in_process_row(self): row = ["test1", "test2", "test3"] values = ["test1", "test2", "test3", "test3", "test3", "test3"] base = BaseImporter() base.fields = [] self.assertRaises(TypeError, base.process_row(row, values), "Invalid Line: 2")