Beispiel #1
0
def test_speaker_compatibility(user, proposal, additional_speaker):
    speaker = PrimarySpeaker(proposal)
    assert speaker.user == user

    assert speaker.proposal == proposal
    assert additional_speaker.proposal == proposal

    assert not speaker.cancelled
    assert not additional_speaker.cancelled

    assert speaker.get_status_display() == 'Proposal author'
    assert additional_speaker.get_status_display() == 'Pending'
Beispiel #2
0
def test_speaker_compatibility(user, proposal, additional_speaker):
    speaker = PrimarySpeaker(proposal)
    assert speaker.user == user

    assert speaker.proposal == proposal
    assert additional_speaker.proposal == proposal

    assert not speaker.cancelled
    assert not additional_speaker.cancelled

    assert speaker.get_status_display() == 'Proposal author'
    assert additional_speaker.get_status_display() == 'Pending'
Beispiel #3
0
def _get_keynote_event_info(event):
    data = event.get_static_data()

    user = _KeynoteUser(
        pk=event.slug,
        speaker_name={k: v['name'] for k, v in data['speaker'].items()},
        bio={k: v['bio'] for k, v in data['speaker'].items()},
        photo=data['photo'],
    )
    event_info = _FakeEventInfo(
        pk=event.slug,
        title={k: v['title'] for k, v in data['session'].items()},
        abstract={k: v['description'] for k, v in data['session'].items()},
        slide_link=None,
        speakers=[PrimarySpeaker(user=user)],
    )

    return event_info
Beispiel #4
0
 def speakers(self):
     yield PrimarySpeaker(user=self.host)
Beispiel #5
0
def test_proposal_speakers(user, proposal, additional_speaker):
    assert list(proposal.speakers) == [
        PrimarySpeaker(proposal),
        additional_speaker,
    ]