def test_get_filter(self): p = Pump("data/building_def.json") p.out_filename = "data/buildings_filtered.txt" n_rows = p.get() self.assertEqual(2, n_rows)
def test_no_update_file(self): p = Pump() p.out_filename = 'data/no_update_file.txt' with self.assertRaises(IOError): p.update()
def test_pump_update(self): p = Pump("data/building_def.json") p.out_filename = "data/pump_data.txt" [add, sub] = p.update() self.assertEqual(2, len(add)) self.assertEqual(2, len(sub))