Ejemplo n.º 1
0
 async def test_create_room(smartthings):
     """Tests the create room method."""
     # Arrange
     room = Room()
     room.name = "Theater"
     room.background_image = "Test"
     room.location_id = LOCATION_ID
     # Act
     room = await smartthings.create_room(room)
     # Assert
     assert room.room_id == ROOM_ID
Ejemplo n.º 2
0
 def test_apply_data():
     """Test the init method."""
     # Arrange
     data = get_json("room.json")
     room = Room()
     room.apply_data(data)
     # Assert
     assert room.room_id == ROOM_ID
     assert room.location_id == LOCATION_ID
     assert room.name == "Theater"
     assert room.background_image == "Test"