示例#1
0
 def test_to_entity(self):
     model = Location(name=Databox.location_name, lon=Databox.lon,
                      lat=Databox.lat, city_id=Databox.city_id,
                      country=Databox.country)
     expected = Databox.location
     result = model.to_entity()
     Asserter.assertLocationEntitiesEqual(self, expected, result)
示例#2
0
 def test_from_entity(self):
     expected = Location(name=Databox.location_name,
                               lon=Databox.lon, lat=Databox.lat,
                               city_id=Databox.city_id,
                               country=Databox.country)
     result = Location.from_entity(Databox.location)
     Asserter.assertLocationModelsEqual(self, expected, result)