Example #1
0
 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
Example #2
0
 def test_is_pcc(self, org_type, expected):
     post = PostElectionFactory.build(ballot_paper_id=org_type)
     assert post.is_pcc == expected
Example #3
0
 def post_election(self):
     return PostElectionFactory.build(election__any_non_by_elections=True)