def test_parsing_of_poi_all_attributes(self): """Check that a PointOfInterest can be constructed using all attributes.""" poi = PointOfInterest(POI_DATA["lat"], POI_DATA["lon"], name=POI_DATA["name"], additionalInfo=POI_DATA["additionalInfo"], street=POI_DATA["street"], city=POI_DATA["city"], postalCode=POI_DATA["postalCode"], country=POI_DATA["country"], website=POI_DATA["website"], phoneNumbers=POI_DATA["phoneNumbers"]) msg = Message.from_poi(poi) self.assertEqual(msg.as_server_request, POI_REQUEST["all"])
def test_parsing_of_poi_min_attributes(self): """Check that a PointOfInterest can be constructed using only latitude & longitude.""" poi = PointOfInterest(POI_DATA["lat"], POI_DATA["lon"]) msg = Message.from_poi(poi) self.assertEqual(msg.as_server_request, POI_REQUEST["min"])