def test_talk_proposal_cancel_form_save(talk_proposal): assert not talk_proposal.cancelled form = TalkProposalCancelForm( data={'cancelled': 'true'}, instance=talk_proposal, ) form.save() assert TalkProposal.objects.get(pk=talk_proposal.pk).cancelled
def test_talk_proposal_cancel_form(talk_proposal): form = TalkProposalCancelForm(instance=talk_proposal) assert list(form.fields) == ['cancelled']