def test_set_location(self): """ test that set_location() sets the location and the moved flag """ hallway = HallwayRoom() player = Player(gender="male", age="10", hair_color="blue") # the player is initiated without a location self.assertIsNone(player.location) player.set_location(hallway) self.assertEqual(player.location, hallway) self.assertTrue(player.moved)