def ballot(self, mocker): """ Returns an unsaved Ballot object with save method on post mocked """ ballot = PostElectionFactory.build(post__division_type="DIW") mocker.patch.object(ballot.post, "save") return ballot
def test_is_pcc(self, org_type, expected): post = PostElectionFactory.build(ballot_paper_id=org_type) assert post.is_pcc == expected
def post_election(self): return PostElectionFactory.build(election__any_non_by_elections=True)