feat: integrate confidential ballot provider evidence

This commit is contained in:
2026-08-02 03:41:05 +02:00
parent 133e55987e
commit 11b946ea78
4 changed files with 36 additions and 1 deletions
+15
View File
@@ -90,6 +90,9 @@ class VotingBallots:
"id": ballot_id,
"revision": 2,
"state": "open",
"assurance_profile": "confidential",
"provider_id": "local_confidential",
"provider_ballot_ref": "local-confidential:ballot-1",
"context": {"module": "committee", "resource_id": "vote-voting"},
}
@@ -117,6 +120,13 @@ class VotingBallots:
threshold_met=True,
winning_options=("yes",),
result_sha256="c" * 64,
evidence=(
{
"kind": "reference_provider_result",
"provider_id": "local_confidential",
"certified": False,
},
),
)
def certify_ballot(self, *args, **kwargs):
@@ -732,6 +742,11 @@ class CommitteeWorkspaceTests(unittest.TestCase):
self.assertEqual("closed", closed.state)
self.assertEqual({"yes": 2, "no": 1}, closed.attributes["counts"])
self.assertEqual("c" * 64, closed.attributes["voting_result_sha256"])
self.assertEqual(
"confidential",
closed.attributes["voting_assurance_profile"],
)
self.assertFalse(closed.attributes["voting_provider_evidence"][0]["certified"])
self.assertEqual("voting", closed.evidence[0].owner_module)
self.assertNotIn("selections", closed.attributes)