Skip to content

Commit

Permalink
Merge pull request #15 from resilientdb/fix-test-driver
Browse files Browse the repository at this point in the history
Fix retrieving txns in test driver
  • Loading branch information
glenn-chen authored Nov 18, 2023
2 parents ecd419c + 739b051 commit 0717b4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@


# %%
## replace `testId` with the txid for the transaction to retrieve
db.transactions.retrieve(txid="testId")

# sent_transfer_tx is in the form "id: ac98e91d01591156008e23de4b5564909228..."
print(db.transactions.retrieve(txid=sent_transfer_tx[len("id: "):]))

#%%
# TODO valide a tx object
Expand Down
8 changes: 4 additions & 4 deletions test_driver_2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#%%

from resdb_driver import Resdb

import json
db_root_url = "http://127.0.0.1:18000"

db = Resdb(db_root_url)
Expand Down Expand Up @@ -68,10 +68,10 @@

sent_transfer_tx = db.transactions.send_commit(fulfilled_transfer_tx)


# %%
## replace `testId` with the txid for the transaction to retrieve
db.transactions.retrieve(txid=sent_transfer_tx)

# sent_transfer_tx is in the form "id: ac98e91d01591156008e23de4b5564909228..."
print(db.transactions.retrieve(txid=sent_transfer_tx[len("id: "):]))

#%%
# TODO valide a tx object
Expand Down

0 comments on commit 0717b4a

Please sign in to comment.