def test_firingIntentForLookingUpMissingBuildingReturnsSomeText(self):
     response = on_intent(
         create_intent_for_looking_up_building_by_name("missing building"),
         {"sessionId": ""})
     self.assertIsNotNone(
         response['response']['outputSpeech']['text'],
         "No text given to indicate we could not find the \"missing building\""
     )
 def test_firingIntentForRoomReturnsExpectedDirections(self):
     for room in union_rooms:
         self.assertEqual(
             room.get_directions(),
             on_intent(
                 create_intent_for_looking_up_room(room.get_names()),
                 {"sessionId": ""})['response']['outputSpeech']['text'],
             "Room {room!s} gave unexpected/wrong directions".format(
                 room=room))
 def test_firingIntentForRoomSynonymsReturnsExpectedDirections(self):
     for room in union_rooms:
         for room_synonym in room.get_names().get_aliases():
             self.assertEqual(
                 room.get_directions(),
                 on_intent(
                     create_intent_for_looking_up_room(room_synonym),
                     {"sessionId": ""})['response']['outputSpeech']['text'],
                 "Room {room!s} gave unexpected/wrong directions using the synonym {synonym}"
                 .format(room=room, synonym=room_synonym))
 def test_firingIntentForBuildingReturnsExpectedDirections(self):
     for canonical_building_name in external_building_directions_relative_to_landmarks:
         response = on_intent(
             createIntentForLookingUpBuilding(canonical_building_name),
             {"sessionId": ""})
         self.assertEqual(
             external_building_directions_relative_to_landmarks[
                 canonical_building_name],
             response['response']['outputSpeech']['text'], "Building  " +
             canonical_building_name + " gave the wrong directions")
 def test_firingIntentForBuildingSynonymsReturnsExpectedDirections(self):
     for building in buildings:
         for room_synonym in building.get_names():
             response = on_intent(
                 create_intent_for_looking_up_building_by_name(
                     room_synonym), {"sessionId": ""})
             self.assertEqual(
                 building.get_directions(),
                 response['response']['outputSpeech']['text'],
                 "Building {building!s} gave wrong/unexpected directions using the synonym {synonym}"
                 .format(building=building, synonym=room_synonym))
 def test_firingIntentForBuildingReturnsExpectedDirections(self):
     for building in buildings:
         response = on_intent(
             create_intent_for_looking_up_building_by_name(
                 building.get_names().get_canonical().replace('_', ' ')),
             {"sessionId": ""})
         self.assertEqual(
             building.get_directions(),
             response['response']['outputSpeech']['text'],
             "Building {building!s} gave wrong/unexpected directions".
             format(building=building))
 def test_firingIntentForUnknownRoomReturnsSomeText(self):
     self.assertIsNotNone(
         on_intent(create_intent_for_looking_up_room("missing room"),
                   {"sessionId": ""})['response']['outputSpeech']['text'],
         "No text generated indicating we could not find the \"missing room\""
     )