Skip to content

Commit 2d1f3a6

Browse files
committed
Refactor imports in Python SDK tests
Updated imports in test files to use explicit module paths for JCS utilities and removed unused constants and imports. Also simplified test for note size by relying on the default internal constant.
1 parent 7070696 commit 2d1f3a6

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

tests/python_sdks/test_proofkit_build_and_hash.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import pytest
66

77
from axiomatic_proofkit import (
8-
NOTE_MAX_BYTES,
9-
DEFAULT_ASSET_TAG,
108
build_p1,
119
canonical_note_bytes_p1,
1210
assert_note_size_ok,
@@ -144,11 +142,11 @@ def test_assert_note_size_ok_passes_for_small_note():
144142
uncertainty_high_eur=11_000.0,
145143
)
146144

147-
# Should not raise for standard NOTE_MAX_BYTES
148-
assert_note_size_ok(p1, max_bytes=NOTE_MAX_BYTES)
145+
# Use default max_bytes (internal constant) – should not raise
146+
assert_note_size_ok(p1)
149147

150148

151-
def test_assert_note_size_ok_raises_when_too_large(monkeypatch):
149+
def test_assert_note_size_ok_raises_when_too_large():
152150
input_hash = "66" * 32
153151
p1 = build_p1(
154152
model_version="v1",
@@ -186,4 +184,4 @@ def test_build_canonical_input_and_compute_input_hash():
186184
assert s == expected_json
187185

188186
ih = compute_input_hash(rec, allowed_keys=allowed_keys)
189-
assert ih == expected_sha
187+
assert ih == expected_sha

tests/python_sdks/test_proofkit_jcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from axiomatic_proofkit import to_jcs_bytes, sha256_hex
5+
from axiomatic_proofkit.jcs import to_jcs_bytes, sha256_hex
66

77

88
def test_jcs_deterministic_order_and_hash():

tests/python_sdks/test_verifier_core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import base64
22
import json
3-
import time
43

54
import pytest
65

76
from axiomatic_verifier import verify_tx, to_jcs_bytes, sha256_hex
87
import axiomatic_verifier.verifier as vmod
9-
from axiomatic_proofkit import to_jcs_bytes as pk_to_jcs_bytes # for cross-check
8+
from axiomatic_proofkit.jcs import to_jcs_bytes as pk_to_jcs_bytes # for cross-check
109

1110

1211
def test_jcs_consistency_between_proofkit_and_verifier():

0 commit comments

Comments
 (0)