def test_returns_member_as_value(self):
        self.login(self.meeting_user)
        vocabulary = get_committee_member_vocabulary(self.meeting)

        self.assertEqual([
            self.committee_president.model, self.committee_participant_1.model,
            self.committee_participant_2.model
        ], [term.value for term in vocabulary])
    def test_return_fullname_with_email_as_title(self):
        self.login(self.meeting_user)
        vocabulary = get_committee_member_vocabulary(self.meeting)

        self.assertEqual([
            u'Sch\xf6ller Heidrun ([email protected])',
            u'W\xf6lfl Gerda ([email protected])',
            u'Wendler Jens ([email protected])'
        ], [term.title for term in vocabulary])
Пример #3
0
    def test_return_fullname_as_title(self):
        member = create(
            Builder('member').having(firstname=u'Hans', lastname=u'M\xfcller'))

        create(
            Builder('membership').having(committee=self.committee_model,
                                         member=member))

        vocabulary = get_committee_member_vocabulary(
            MeetingWrapper(self.committee, self.meeting))

        self.assertEqual(u'M\xfcller Hans', vocabulary._terms[0].title)
Пример #4
0
    def test_return_fullname_as_title(self):
        member = create(Builder('member').having(
            firstname=u'Hans', lastname=u'M\xfcller'))

        create(Builder('membership').having(
            committee=self.committee_model,
            member=member))

        vocabulary = get_committee_member_vocabulary(
            MeetingWrapper(self.committee, self.meeting))

        self.assertEqual(
            u'M\xfcller Hans',
            vocabulary._terms[0].title)
Пример #5
0
    def test_return_fullname_with_email_as_value(self):
        member = create(Builder('member').having(
            firstname=u'Hans',
            lastname=u'M\xfcller',
            email=u'*****@*****.**'))

        create(Builder('membership').having(
            committee=self.committee_model,
            member=member))

        vocabulary = get_committee_member_vocabulary(
            MeetingWrapper(self.committee, self.meeting))

        self.assertEqual(
            u'Hans M\xfcller ([email protected])',
            vocabulary._terms[0].title)
    def test_omits_braces_when_no_email_is_available(self):
        self.login(self.meeting_user)
        self.committee_president.model.email = None

        vocabulary = get_committee_member_vocabulary(self.meeting)
        self.assertEqual(u'Sch\xf6ller Heidrun', vocabulary._terms[0].title)