Skip to content

Commit 297d858

Browse files
committed
test: use appropriate app_id when providing gtxns
1 parent 0f34b7f commit 297d858

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/scratch_storage/test_contract.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ def test_simple_contract(context: AlgopyTestContext) -> None:
3333

3434
# Act
3535
with context.txn.create_group(
36-
gtxns=[context.any.txn.application_call(scratch_space=[0, 5, b"Hello World"])]
36+
gtxns=[
37+
context.any.txn.application_call(
38+
app_id=context.get_app_for_contract(contract), scratch_space=[0, 5, b"Hello World"]
39+
)
40+
]
3741
):
3842
result = contract.approval_program()
3943

examples/simple_voting/test_contract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_vote(context: AlgopyTestContext) -> None:
3636
gtxns=[
3737
context.any.txn.application_call(
3838
sender=voter,
39-
app_id=context.any.application(),
39+
app_id=context.get_app_for_contract(contract),
4040
app_args=[algopy.Bytes(b"vote"), voter.bytes],
4141
),
4242
context.any.txn.payment(

0 commit comments

Comments
 (0)