Skip to content

Commit 69b5d7b

Browse files
added assert to test if is called.
1 parent 0ba43d4 commit 69b5d7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/thirdparty/test_thirdparty.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141

4242
respx_mock = respx.MockRouter
4343

44+
access_token_validated: bool = False
45+
4446

4547
@fixture(scope="function")
4648
async def fastapi_client():
@@ -145,7 +147,9 @@ async def valid_access_token( # pylint: disable=unused-argument
145147
config: ProviderConfigForClient,
146148
user_context: Optional[Dict[str, Any]],
147149
):
150+
global access_token_validated
148151
if access_token == "accesstoken":
152+
access_token_validated = True
149153
return
150154
raise Exception("Unexpected access token")
151155

@@ -262,4 +266,5 @@ async def test_signinup_works_when_validate_access_token_does_not_throw(
262266
)
263267

264268
assert res.status_code == 200
269+
assert access_token_validated is True
265270
assert res.json()["status"] == "OK"

0 commit comments

Comments
 (0)