Correct failing unittest test_city_with_sensors

This commit is contained in:
Guille Gutierrez 2021-06-02 09:42:39 -04:00
parent 85a275d7c1
commit 30d5502b63

View File

@ -50,9 +50,5 @@ class TestSensorsFactory(TestCase):
update = pd.DataFrame([['2020-01-19 23:55:00', '12345.0']], columns=["Date time", "Energy consumption"]) update = pd.DataFrame([['2020-01-19 23:55:00', '12345.0']], columns=["Date time", "Energy consumption"])
update = update.astype({"Date time": 'datetime64', "Energy consumption":'float64'}) update = update.astype({"Date time": 'datetime64', "Energy consumption":'float64'})
sensor.add_period(update) sensor.add_period(update)
row = sensor.measures.loc[sensor.measures["Date time"] == '2020-01-19 23:55:00'] row = sensor.measures.loc[sensor.measures["Date time"] == '2020-01-19 23:55:00']['Energy consumption'].iloc[0]
print(row["Energy consumption"][0]) self.assertTrue(f'{row}' == '12345.0')
self.assertTrue(row[0]["Energy consumption"] is '12345.0')