Skip to content

Commit ebf0c3d

Browse files
committed
update new test changes
1 parent b7ef3f9 commit ebf0c3d

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

tests/intergration/test_convex_break.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,16 @@ def test_schedule_transfer(convex, test_account, other_account):
6060
'(do
6161
(defn tx-delay [to-address amount]
6262
(transfer to-address amount)
63-
(schedule (+ *timestamp* 1000) (recur tx-delay (to-address amount)))
63+
(def call-address *address*)
64+
(schedule (+ *timestamp* 1000) (call call-address (tx-delay to-address amount)))
6465
)
6566
(defn tx-now [to-address amount]
6667
(transfer to-address amount)
6768
)
68-
(export tx-delay tx-now)
69+
(defn show-schedule []
70+
[(get *state* :schedule) *address*]
71+
)
72+
(export show-schedule tx-delay tx-now)
6973
)
7074
)
7175
)
@@ -77,9 +81,7 @@ def test_schedule_transfer(convex, test_account, other_account):
7781
contract_address = result['value']
7882
convex.transfer(contract_address, 8000000, other_account)
7983
auto_topup_account(convex, test_account)
80-
result = convex.send(f'(call transfer-for-ever (tx-delay {other_account.address} 1000))', test_account)
84+
result = convex.send(f'(call {contract_address} (tx-delay {other_account.address} 1000))', test_account)
85+
print(result)
86+
result = convex.send(f'(call {contract_address} (show-schedule))', test_account)
8187
print(result)
82-
83-
#for index in range(0, 10):
84-
#result = convex.query('(call transfer-for-ever (counter))', test_account)
85-
#print(result)

tests/intergration/test_ddo_register_contract.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
from convex_api.convex_api import ConvexAPI
1313
from convex_api.exceptions import ConvexAPIError
1414

15+
# (import convex.trust :as trust)
16+
1517

1618
CONTRACT_NAME='starfish-ddo-register'
1719
CONTRACT_VERSION = '0.0.4'

0 commit comments

Comments
 (0)