def test_speaker_orga_serializer(slot):
    user_profile = slot.submission.speakers.first().profiles.first()
    user = user_profile.user
    data = SpeakerOrgaSerializer(user_profile).data
    assert data.keys() == {
        'name',
        'code',
        'biography',
        'submissions',
        'avatar',
        'answers',
        'email',
    }
    assert data['name'] == user.name
    assert data['code'] == user.code
    assert data['email'] == user.email
    assert slot.submission.code in data['submissions']
Exemple #2
0
def test_speaker_orga_serializer(slot):
    with scope(event=slot.submission.event):
        user_profile = slot.submission.speakers.first().profiles.first()
        user = user_profile.user
        data = SpeakerOrgaSerializer(user_profile).data
    assert data.keys() == {
        "name",
        "code",
        "biography",
        "submissions",
        "avatar",
        "answers",
        "email",
        "availabilities",
    }
    assert data["name"] == user.name
    assert data["code"] == user.code
    assert data["email"] == user.email
    assert slot.submission.code in data["submissions"]