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"])
Exemple #2
0
 def test_parsing_of_message_all_attributes(self):
     """Check that a Message can be constructed using text."""
     msg = Message.from_text(MESSAGE_DATA["text"], MESSAGE_DATA["subject"])
     self.assertEqual(msg.as_server_request, MESSAGE_REQUEST["all"])
Exemple #3
0
 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"])