Skip to content

Commit 71c5a62

Browse files
committed
Add test case for frozen indefinite list
1 parent 10b17b4 commit 71c5a62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/pycardano/test_serialization.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,3 +1067,9 @@ class MyTest(DictCBORSerializable):
10671067
d[a] = 1
10681068

10691069
check_two_way_cbor(d)
1070+
1071+
def test_indefinite_list_highjacking_does_not_break_cbor2():
1072+
ls = IndefiniteFrozenList(["hello"])
1073+
ls.freeze()
1074+
a = {ls: 1}
1075+
cbor2.loads(cbor2.dumps(a, default=default_encoder))

0 commit comments

Comments
 (0)