11import unittest
2- import payjoin as payjoin
3- import payjoin .bitcoin
2+ import payjoin
3+ import payjoin .bitcoin
44
55class TestURIs (unittest .TestCase ):
66 def test_todo_url_encoded (self ):
@@ -31,7 +31,7 @@ def test_valid_uris(self):
3131 except Exception as e :
3232 self .fail (f"Failed to create a valid Uri for { uri } . Error: { e } " )
3333
34- class InMemoryReceiverPersister (payjoin .payjoin_ffi . JsonReceiverSessionPersister ):
34+ class InMemoryReceiverPersister (payjoin .JsonReceiverSessionPersister ):
3535 def __init__ (self , id ):
3636 self .id = id
3737 self .events = []
@@ -50,15 +50,15 @@ class TestReceiverPersistence(unittest.TestCase):
5050 def test_receiver_persistence (self ):
5151 persister = InMemoryReceiverPersister (1 )
5252 address = payjoin .bitcoin .Address ("tb1q6d3a2w975yny0asuvd9a67ner4nks58ff0q8g4" , payjoin .bitcoin .Network .SIGNET )
53- payjoin .payjoin_ffi . ReceiverBuilder (
53+ payjoin .ReceiverBuilder (
5454 address ,
5555 "https://example.com" ,
5656 payjoin .OhttpKeys .decode (bytes .fromhex ("01001604ba48c49c3d4a92a3ad00ecc63a024da10ced02180c73ec12d8a7ad2cc91bb483824fe2bee8d28bfe2eb2fc6453bc4d31cd851e8a6540e86c5382af588d370957000400010003" )),
5757 ).build ().save (persister )
58- result = payjoin .payjoin_ffi . replay_receiver_event_log (persister )
58+ result = payjoin .replay_receiver_event_log (persister )
5959 self .assertTrue (result .state ().is_INITIALIZED ())
6060
61- class InMemorySenderPersister (payjoin .payjoin_ffi . JsonSenderSessionPersister ):
61+ class InMemorySenderPersister (payjoin .JsonSenderSessionPersister ):
6262 def __init__ (self , id ):
6363 self .id = id
6464 self .events = []
@@ -78,7 +78,7 @@ def test_sender_persistence(self):
7878 # Create a receiver to just get the pj uri
7979 persister = InMemoryReceiverPersister (1 )
8080 address = payjoin .bitcoin .Address ("2MuyMrZHkbHbfjudmKUy45dU4P17pjG2szK" , payjoin .bitcoin .Network .TESTNET )
81- receiver = payjoin .payjoin_ffi . ReceiverBuilder (
81+ receiver = payjoin .ReceiverBuilder (
8282 address ,
8383 "https://example.com" ,
8484 payjoin .OhttpKeys .decode (bytes .fromhex ("01001604ba48c49c3d4a92a3ad00ecc63a024da10ced02180c73ec12d8a7ad2cc91bb483824fe2bee8d28bfe2eb2fc6453bc4d31cd851e8a6540e86c5382af588d370957000400010003" )),
0 commit comments