Skip to content

Commit

Permalink
feat: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwise-constructs committed Dec 18, 2024
1 parent b9aa930 commit 8ddb9cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion eth_pydantic_types/hex.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ class HexStr20(BoundHexStr):
size: ClassVar[int] = 20


HexStr32: TypeAlias = BoundHexStr
HexStr32: "TypeAlias" = BoundHexStr
4 changes: 2 additions & 2 deletions tests/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def test_model_dump(bytes32str):
model = Model.from_single(5)
actual = model.model_dump()
expected = {
"valuebytes20": "0000000000000000000000000000000000000005",
"valuebytes32": "0000000000000000000000000000000000000000000000000000000000000005",
"valuebytes20": "0x0000000000000000000000000000000000000005",
"valuebytes32": "0x0000000000000000000000000000000000000000000000000000000000000005",
"valuestr32": "0x0000000000000000000000000000000000000000000000000000000000000005",
}
assert actual == expected
2 changes: 1 addition & 1 deletion tests/test_hex.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_hexbytes_schema():
def test_hexbytes_model_dump(bytes32str):
model = BytesModel(value=bytes32str)
actual = model.model_dump()
expected = {"value": "9b70bd98ccb5b6434c2ead14d68d15f392435a06ff469f8d1f8cf38b2ae0b0e2"}
expected = {"value": "0x9b70bd98ccb5b6434c2ead14d68d15f392435a06ff469f8d1f8cf38b2ae0b0e2"}
assert actual == expected


Expand Down

0 comments on commit 8ddb9cc

Please sign in to comment.