Skip to content

Commit

Permalink
test: use appropriate app_id when providing gtxns
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-makerx committed Aug 21, 2024
1 parent 0f34b7f commit 297d858
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/scratch_storage/test_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def test_simple_contract(context: AlgopyTestContext) -> None:

# Act
with context.txn.create_group(
gtxns=[context.any.txn.application_call(scratch_space=[0, 5, b"Hello World"])]
gtxns=[
context.any.txn.application_call(
app_id=context.get_app_for_contract(contract), scratch_space=[0, 5, b"Hello World"]
)
]
):
result = contract.approval_program()

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_voting/test_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_vote(context: AlgopyTestContext) -> None:
gtxns=[
context.any.txn.application_call(
sender=voter,
app_id=context.any.application(),
app_id=context.get_app_for_contract(contract),
app_args=[algopy.Bytes(b"vote"), voter.bytes],
),
context.any.txn.payment(
Expand Down

0 comments on commit 297d858

Please sign in to comment.