From 30d5502b6361ad862b16e2c7d2248271c8caf76a Mon Sep 17 00:00:00 2001 From: guille Date: Wed, 2 Jun 2021 09:42:39 -0400 Subject: [PATCH] Correct failing unittest test_city_with_sensors --- non_functional_tests/test_sensors_factory.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/non_functional_tests/test_sensors_factory.py b/non_functional_tests/test_sensors_factory.py index 992be9cf..3e718572 100644 --- a/non_functional_tests/test_sensors_factory.py +++ b/non_functional_tests/test_sensors_factory.py @@ -50,9 +50,5 @@ class TestSensorsFactory(TestCase): 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'}) sensor.add_period(update) - row = sensor.measures.loc[sensor.measures["Date time"] == '2020-01-19 23:55:00'] - print(row["Energy consumption"][0]) - self.assertTrue(row[0]["Energy consumption"] is '12345.0') - - - + row = sensor.measures.loc[sensor.measures["Date time"] == '2020-01-19 23:55:00']['Energy consumption'].iloc[0] + self.assertTrue(f'{row}' == '12345.0')