@@ -98,12 +98,13 @@ def tearDown(self):
9898
9999 def test_public_asset_create_simple_hash (self ):
100100 """
101- Test asset creation uses simple hash proof mechanism
101+ Test public asset creation with the simple hash proof mechanism
102102 """
103103 asset = self .arch .assets .create (
104104 attrs = self .traffic_light ,
105105 props = {
106106 "public" : True ,
107+ "proof_mechanism" : ProofMechanism .SIMPLE_HASH .name ,
107108 },
108109 confirm = True ,
109110 )
@@ -126,6 +127,37 @@ def test_public_asset_create_simple_hash(self):
126127 events = public .events .list (asset_id = asset_publicurl )
127128 LOGGER .debug ("events %s" , json_dumps (list (events ), sort_keys = True , indent = 4 ))
128129
130+ def test_public_asset_create_merkle_log (self ):
131+ """
132+ Test public asset creation with the merkle log proof mechanism
133+ """
134+ asset = self .arch .assets .create (
135+ attrs = self .traffic_light ,
136+ props = {
137+ "public" : True ,
138+ "proof_mechanism" : ProofMechanism .MERKLE_LOG .name ,
139+ },
140+ confirm = True ,
141+ )
142+ LOGGER .debug ("asset %s" , json_dumps (asset , sort_keys = True , indent = 4 ))
143+ self .assertEqual (
144+ asset ["proof_mechanism" ],
145+ ProofMechanism .MERKLE_LOG .name ,
146+ msg = "Incorrect asset proof mechanism" ,
147+ )
148+ self .assertEqual (
149+ asset ["public" ],
150+ True ,
151+ msg = "Asset is not public" ,
152+ )
153+ asset_publicurl = self .arch .assets .publicurl (asset ["identity" ])
154+ LOGGER .debug ("asset_publicurl %s" , asset_publicurl )
155+ public = self .arch .Public
156+ count = public .events .count (asset_id = asset_publicurl )
157+ LOGGER .debug ("count %s" , count )
158+ events = public .events .list (asset_id = asset_publicurl )
159+ LOGGER .debug ("events %s" , json_dumps (list (events ), sort_keys = True , indent = 4 ))
160+
129161 def test_public_asset_create_event (self ):
130162 """
131163 Test list
0 commit comments