Temporary fix sensor test
This commit is contained in:
parent
311342e17e
commit
eb249f84d3
|
@ -169,7 +169,7 @@ class City:
|
|||
self._buildings = []
|
||||
self._buildings.append(new_city_object)
|
||||
else:
|
||||
raise NotImplementedError
|
||||
raise NotImplementedError(new_city_object.type)
|
||||
|
||||
def remove_city_object(self, city_object):
|
||||
"""
|
||||
|
|
|
@ -39,7 +39,12 @@ class TestSensorsFactory(TestCase):
|
|||
buildings.append(Building("EV", lod, surfaces, year_of_construction, function, lower_corner))
|
||||
buildings.append(Building("GM", lod, surfaces, year_of_construction, function, lower_corner))
|
||||
city = City(lower_corner, upper_corner, srs_name)
|
||||
city.add_city_object(CityObject("GM_MB_EV", lod, surfaces, lower_corner))
|
||||
#virtual_building = CityObject("GM_MB_EV", lod, surfaces, lower_corner)
|
||||
#virtual_building.type = 'Virtual'
|
||||
#city.add_city_object(virtual_building)
|
||||
|
||||
for building in buildings:
|
||||
city.add_city_object(building)
|
||||
return city
|
||||
|
||||
def test_city_with_sensors(self):
|
||||
|
@ -47,9 +52,7 @@ class TestSensorsFactory(TestCase):
|
|||
SensorsFactory('cgf', self._city, self._end_point).enrich()
|
||||
SensorsFactory('ct', self._city, self._end_point).enrich()
|
||||
for city_object in self._city.city_objects:
|
||||
print(city_object.name)
|
||||
for sensor in city_object.sensors:
|
||||
print(sensor.name)
|
||||
# force update last row
|
||||
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'})
|
||||
|
|
Loading…
Reference in New Issue
Block a user