Skip to content

Commit 311ee29

Browse files
committed
Add test that fails for Datum type
1 parent 3c76964 commit 311ee29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/pycardano/test_serialization.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
from dataclasses import dataclass, field
2+
3+
from pycardano import Datum
24
from test.pycardano.util import check_two_way_cbor
35
from typing import Any, Dict, List, Optional, Set, Tuple, Union
46

@@ -173,6 +175,15 @@ class Test1(MapCBORSerializable):
173175

174176
check_two_way_cbor(t)
175177

178+
def test_datum_type():
179+
@dataclass
180+
class Test1(MapCBORSerializable):
181+
b: Datum
182+
183+
t = Test1(b=1)
184+
185+
check_two_way_cbor(t)
186+
176187

177188
def test_wrong_primitive_type():
178189
@dataclass

0 commit comments

Comments
 (0)