Example #1
0
def test_room_orga_serializer(room):
    data = RoomOrgaSerializer(room).data
    assert set(data.keys()) == {
        'id',
        'name',
        'description',
        'capacity',
        'position',
        'speaker_info',
        'availabilities',
    }
    assert data['id'] == room.pk
Example #2
0
def test_room_orga_serializer(room):
    with scope(event=room.event):
        data = RoomOrgaSerializer(room).data
        assert set(data.keys()) == {
            "id",
            "name",
            "description",
            "capacity",
            "position",
            "speaker_info",
            "availabilities",
            "url",
        }
        assert data["id"] == room.pk