Skip to content

Commit a4fd27f

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/pycardano/test_serialization.py

Lines changed: 12 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

@@ -174,6 +176,16 @@ class Test1(MapCBORSerializable):
174176
check_two_way_cbor(t)
175177

176178

179+
def test_datum_type():
180+
@dataclass
181+
class Test1(MapCBORSerializable):
182+
b: Datum
183+
184+
t = Test1(b=1)
185+
186+
check_two_way_cbor(t)
187+
188+
177189
def test_wrong_primitive_type():
178190
@dataclass
179191
class Test1(MapCBORSerializable):

0 commit comments

Comments
 (0)