@@ -175,15 +175,15 @@ def test_tally_ballot_invalid_input_fails(
175175
176176 # verify an UNKNOWN state ballot fails
177177 self .assertIsNone (tally_ballot (first_ballot , tally ))
178- self .assertFalse (tally .append (first_ballot ))
178+ self .assertFalse (tally .append (first_ballot , True ))
179179
180180 # cast a ballot
181181 first_ballot .state = BallotBoxState .CAST
182- self .assertTrue (tally .append (first_ballot ))
182+ self .assertTrue (tally .append (first_ballot , False ))
183183
184184 # try to append a spoiled ballot
185185 first_ballot .state = BallotBoxState .SPOILED
186- self .assertFalse (tally .append (first_ballot ))
186+ self .assertFalse (tally .append (first_ballot , True ))
187187
188188 # Verify accumulation fails if the selection collection is empty
189189 if first_ballot .state == BallotBoxState .CAST :
@@ -217,12 +217,12 @@ def test_tally_ballot_invalid_input_fails(
217217
218218 # verify a cast ballot cannot be added twice
219219 first_ballot .state = BallotBoxState .CAST
220- self .assertTrue (tally .append (first_ballot ))
221- self .assertFalse (tally .append (first_ballot ))
220+ self .assertTrue (tally .append (first_ballot , True ))
221+ self .assertFalse (tally .append (first_ballot , False ))
222222
223223 # verify an already submitted ballot cannot be changed or readded
224224 first_ballot .state = BallotBoxState .SPOILED
225- self .assertFalse (tally .append (first_ballot ))
225+ self .assertFalse (tally .append (first_ballot , True ))
226226
227227 @staticmethod
228228 def _decrypt_with_secret (
@@ -255,7 +255,7 @@ def _cannot_erroneously_mutate_state(
255255 ballot .contests [0 ].ballot_selections .remove (first_selection )
256256
257257 self .assertIsNone (tally_ballot (ballot , tally ))
258- self .assertFalse (tally .append (ballot ))
258+ self .assertFalse (tally .append (ballot , True ))
259259
260260 # Verify accumulation fails if the selection count does not match
261261 if ballot .state == BallotBoxState .CAST :
@@ -278,15 +278,15 @@ def _cannot_erroneously_mutate_state(
278278 first_contest_hash = ballot .contests [0 ].description_hash
279279 ballot .contests [0 ].description_hash = ONE_MOD_Q
280280 self .assertIsNone (tally_ballot (ballot , tally ))
281- self .assertFalse (tally .append (ballot ))
281+ self .assertFalse (tally .append (ballot , True ))
282282
283283 ballot .contests [0 ].description_hash = first_contest_hash
284284
285285 # modify a contest object id
286286 first_contest_object_id = ballot .contests [0 ].object_id
287287 ballot .contests [0 ].object_id = "a-bad-object-id"
288288 self .assertIsNone (tally_ballot (ballot , tally ))
289- self .assertFalse (tally .append (ballot ))
289+ self .assertFalse (tally .append (ballot , True ))
290290
291291 ballot .contests [0 ].object_id = first_contest_object_id
292292
@@ -297,7 +297,7 @@ def _cannot_erroneously_mutate_state(
297297 ballot .contests [0 ].ballot_selections [0 ].object_id = "another-bad-object-id"
298298
299299 self .assertIsNone (tally_ballot (ballot , tally ))
300- self .assertFalse (tally .append (ballot ))
300+ self .assertFalse (tally .append (ballot , True ))
301301
302302 # Verify accumulation fails if the selection object id does not match
303303 if ballot .state == BallotBoxState .CAST :
@@ -315,7 +315,7 @@ def _cannot_erroneously_mutate_state(
315315 first_ballot_hash = ballot .manifest_hash
316316 ballot .manifest_hash = ONE_MOD_Q
317317 self .assertIsNone (tally_ballot (ballot , tally ))
318- self .assertFalse (tally .append (ballot ))
318+ self .assertFalse (tally .append (ballot , True ))
319319
320320 ballot .manifest_hash = first_ballot_hash
321321 ballot .state = input_state
0 commit comments