Пример #1
0
 def setUpTestData(cls):
     cls.alice = create_user(email_addr='*****@*****.**')
     cls.bob = create_user(email_addr='*****@*****.**')
     cls.clara = create_user(email_addr='*****@*****.**')
     cls.proposal_1 = create_proposal(cls.alice, state='accept')
     cls.proposal_2 = create_proposal(cls.alice, state='reject')
     cls.proposal_3 = create_proposal(cls.bob, state='accept')
     cls.proposal_4 = create_proposal(cls.clara, state='')
Пример #2
0
    def test_when_has_proposal(self):
        proposal = cfp_factories.create_proposal(self.alice)

        rsp = self.client.get('/')
        self.assertContains(
            rsp,
            '<a href="/cfp/proposals/new/">Make another proposal to our Call for Participation</a>',
            html=True)
        self.assertContains(
            rsp,
            f'<a href="/cfp/proposals/{proposal.proposal_id}/">View your proposal to our Call for Participation</a> ({proposal.title})',
            html=True)
Пример #3
0
    def test_when_has_proposal_and_cfp_closed(self):
        cfp_factories.create_proposal(self.alice)

        rsp = self.client.get('/')
        self.assertNotContains(
            rsp, 'Make another proposal to our Call for Participation')