@@ -50,7 +50,7 @@ def test_grants( tmp_path ):
5050
5151 """
5252
53- # test = Path( __file__ ).resolve().parent, # Our payments_test.crypto-keypair... file w/ O2o...2ik=
53+ test = Path ( __file__ ).resolve () # Our payments_test.py file
5454 here = Path ( tmp_path ).resolve () # Our testing directory.
5555
5656 name_ss = "self-signed"
@@ -119,6 +119,7 @@ def test_grants( tmp_path ):
119119 # We'll be loading an existing Client Agent keypair, so restrict it from registering a new one.
120120 # It must try to load the Author's License (using the author.service as the basename), and then
121121 # attempt to sign and save an instance of it with the client Keypair.
122+ machine_id_path = test .with_suffix ( '' ) / "payments_test.machine-id"
122123 reloader = reload (
123124 author = author ,
124125 client = client ,
@@ -127,11 +128,16 @@ def test_grants( tmp_path ):
127128 basename = name_cl , # basename of the License, and the Keypair use to self-sign it
128129 confirm = False ,
129130 extra = [ str ( here ) ],
131+ constraints = dict (
132+ machine = True ,
133+ ),
134+ machine_id_path = machine_id_path ,
130135 )
131136
132137 username = user_cl
133138 password = pswd_cl
134139 grants = None
140+ keypairs ,licenses = [],[]
135141 try :
136142 key ,val = next ( reloader )
137143 while True :
@@ -147,8 +153,16 @@ def test_grants( tmp_path ):
147153 continue
148154 else :
149155 log .info ( f"test_grants -x- ignoring { val } " )
150- elif key == Process .GRANTS :
156+ elif key is Process .GRANTS :
157+ log .warning ( f"Grants: { val } " )
151158 grants = val
159+ elif key is Process .KEYPAIR :
160+ log .warning ( f"Keypair: { val } " )
161+ keypairs .append ( val )
162+ elif key is Process .LICENSE :
163+ log .warning ( f"License: { val [1 ]} , w/ Keypair: { licensing .KeypairPlaintext ( val [0 ] )} " )
164+ keypairs .append ( val [0 ] )
165+ licenses .append ( val [1 ] )
152166 key ,val = next ( reloader )
153167 except StopIteration :
154168 log .info ( f"test_grants xxx Done w/ key == { key } , val == { val } " )
0 commit comments