def test_speaker_serializer(slot): user_profile = slot.submission.speakers.first().profiles.first() user = user_profile.user data = SpeakerSerializer(user_profile).data assert data.keys() == {'name', 'code', 'biography', 'submissions'} assert data['name'] == user.name assert data['code'] == user.code assert slot.submission.code in data['submissions']
def test_speaker_serializer(slot): with scope(event=slot.submission.event): user_profile = slot.submission.speakers.first().profiles.first() user = user_profile.user data = SpeakerSerializer(user_profile).data assert slot.submission.code in data["submissions"] assert data.keys() == { "name", "code", "biography", "submissions", "avatar" } assert data["name"] == user.name assert data["code"] == user.code