|
| 1 | +# mypy: disable-error-code="no-untyped-call" |
1 | 2 | import algokit_utils |
2 | 3 | import algosdk |
3 | 4 | import pytest |
@@ -146,28 +147,32 @@ def test_get_global_state(state_app_client: StateAppClient) -> None: |
146 | 147 | state_app_client.deploy( |
147 | 148 | template_values={"VALUE": 1}, allow_delete=True, allow_update=True, on_update=OnUpdate.UpdateApp |
148 | 149 | ) |
149 | | - state_app_client.set_global(int1=1, int2=2, bytes1="test", bytes2=b"test") |
| 150 | + int1_expected = 1 |
| 151 | + int2_expected = 2 |
| 152 | + state_app_client.set_global(int1=int1_expected, int2=int2_expected, bytes1="test", bytes2=b"test") |
150 | 153 | response = state_app_client.get_global_state() |
151 | 154 |
|
152 | 155 | assert response.bytes1.as_bytes == b"test" |
153 | 156 | assert response.bytes2.as_str == "test" |
154 | | - assert response.int1 == 1 |
155 | | - assert response.int2 == 2 |
| 157 | + assert response.int1 == int1_expected |
| 158 | + assert response.int2 == int2_expected |
156 | 159 | assert response.value == 1 |
157 | 160 |
|
158 | 161 |
|
159 | 162 | def test_get_local_state(state_app_client: StateAppClient) -> None: |
160 | 163 | state_app_client.deploy( |
161 | 164 | template_values={"VALUE": 1}, allow_delete=True, allow_update=True, on_update=OnUpdate.UpdateApp |
162 | 165 | ) |
| 166 | + int1_expected = 1 |
| 167 | + int2_expected = 2 |
163 | 168 | state_app_client.opt_in(args=OptInArgs()) |
164 | | - state_app_client.set_local(int1=1, int2=2, bytes1="test", bytes2=b"test") |
| 169 | + state_app_client.set_local(int1=int1_expected, int2=int2_expected, bytes1="test", bytes2=b"test") |
165 | 170 | response = state_app_client.get_local_state(account=None) |
166 | 171 |
|
167 | 172 | assert response.local_bytes1.as_str == "test" |
168 | 173 | assert response.local_bytes2.as_str == "test" |
169 | | - assert response.local_int1 == 1 |
170 | | - assert response.local_int2 == 2 |
| 174 | + assert response.local_int1 == int1_expected |
| 175 | + assert response.local_int2 == int2_expected |
171 | 176 |
|
172 | 177 |
|
173 | 178 | def test_deploy_create_1arg(state_app_client: StateAppClient) -> None: |
|
0 commit comments