Skip to content

Commit

Permalink
Restore simple hash enum
Browse files Browse the repository at this point in the history
AB#92329
  • Loading branch information
eccles committed Jul 1, 2024
1 parent 683f62a commit 995891e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-builder
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM python:${VERSION}-bookworm
# .github/workflows/python-package.yml
# .github/workflows/python-publish.yml
#
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN curl -fsSOL https://taskfile.dev/install.sh \
&& sh install.sh \
Expand Down
2 changes: 1 addition & 1 deletion archivist/proof_mechanism.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class ProofMechanism(Enum):

# previously used but now removed
__RESERVED1 = 1
__RESERVED2 = 2
SIMPLE_HASH = 2
#: Assets and events are proven using a merkle log hash of the originator's evidence
MERKLE_LOG = 3
14 changes: 7 additions & 7 deletions unittests/testproof_mechanism.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def test_proof_mechanism_reserved1(self):
ProofMechanism.__RESERVED1.name, "__RESERVED1", msg="Incorrect value"
)

def test_proof_mechanism_reserved2(self):
def test_proof_mechanism_simple_hash(self):
"""
Test proof_mechanism
"""
with self.assertRaises(AttributeError):
self.assertEqual(ProofMechanism.__RESERVED2.value, 2, msg="Incorrect value")
self.assertEqual(ProofMechanism.SIMPLE_HASH.value, 2, msg="Incorrect value")

with self.assertRaises(AttributeError):
self.assertEqual(
ProofMechanism.__RESERVED2.name, "__RESERVED2", msg="Incorrect value"
)
self.assertEqual(
ProofMechanism.SIMPLE_HASH.name,
"SIMPLE_HASH",
msg="Incorrect value",
)

0 comments on commit 995891e

Please sign in to comment.