def test_get_from_file(self): office = Space(1, 'prooms', 1) d = office.get_from_file(r'data/prooms.txt') # check if the number list items equals number of lines ina file with open('data/prooms.txt') as f: total = sum(1 for _ in f) self.assertTrue(type(d), type([])) # check that the lit has equal number lines and self.assertTrue(len(d), total)