Example #1
0
def test_tutorial_proposal_cancel_form_save(tutorial_proposal):
    assert not tutorial_proposal.cancelled
    form = TutorialProposalCancelForm(
        data={'cancelled': 'true'}, instance=tutorial_proposal,
    )
    form.save()
    assert TutorialProposal.objects.get(pk=tutorial_proposal.pk).cancelled
Example #2
0
def test_tutorial_proposal_cancel_form_save(tutorial_proposal):
    assert not tutorial_proposal.cancelled
    form = TutorialProposalCancelForm(
        data={'cancelled': 'true'}, instance=tutorial_proposal,
    )
    form.save()
    assert TutorialProposal.objects.get(pk=tutorial_proposal.pk).cancelled
Example #3
0
def test_tutorial_proposal_cancel_form(tutorial_proposal):
    form = TutorialProposalCancelForm(instance=tutorial_proposal)
    assert list(form.fields) == ['cancelled']