Example #1
0
 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')
Example #2
0
    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))
Example #3
0
    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))
Example #4
0
 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')
Example #5
0
 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")