def setUp(self) -> None:
     self.file_rows = [
         FileRow({'name': 'Aaron'}),
         FileRow({'age': '40'}),
         FileRow({'dob': '06/12/1980'})
     ]
     self.file_instance = FileInstance('file_name', self.file_rows)
 def test_five(self):
     file_rows = [
         FileRow({}),
         FileRow({}),
         FileRow({}),
         FileRow({}),
         FileRow({})
     ]
     self.assertTrue(len(FileInstance('', file_rows)) == 5)
 def setUp(self) -> None:
     self.file_rows = [
         FileRow({'name': 'John'}),
         FileRow({'name': 'Joe'}),
         FileRow({'name': 'Jeff'}),
         FileRow({'name': 'Adam'}),
         FileRow({'name': 'Alex'}),
         FileRow({'name': 'Steve'})
     ]
     self.file_instance = FileInstance('', self.file_rows)
 def process(self, file: IO) -> FileInstance:
     records = self.process_file_records(file)
     return FileInstance(file.name, records)
 def test_different_file_rows(self):
     self.assertFalse(
         FileInstance(self.file_name, self.file_rows) == FileInstance(
             self.file_name, [FileRow({})]))
 def test_different_file_names(self):
     self.assertFalse(
         FileInstance(self.file_name + '1', self.file_rows) == FileInstance(
             self.file_name + '2', self.file_rows))
 def test_are_equal(self):
     self.assertTrue(
         FileInstance(self.file_name, self.file_rows) == FileInstance(
             self.file_name, self.file_rows))
 def test_one(self):
     file_row = FileRow({})
     self.assertTrue(len(FileInstance('', [file_row])) == 1)
 def test_zero(self):
     self.assertTrue(len(FileInstance('', [])) == 0)
 def setUp(self) -> None:
     self.file_row = FileRow({'name': 'Alex', 'age': '27'})
     self.file_instance = FileInstance('file_name', [self.file_row])
 def test_file_rows_missing(self):
     with self.assertRaises(TypeError):
         FileInstance(file_name='file_name')
 def test_file_name_and_file_rows(self):
     file_row = FileRow({'name': 'John'})
     file_instance = FileInstance('file_name', [file_row])
     self.assertEqual('file_name', file_instance.file_name)
     self.assertTrue(len(file_instance.file_rows) == 1)
     self.assertEqual([file_row], file_instance.file_rows)