Skip to content

Commit

Permalink
added more checks in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Oct 17, 2024
1 parent 7576392 commit d747a89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/blueapi/service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from contextlib import asynccontextmanager
from typing import Any

from dotenv import load_dotenv
from fastapi import (
BackgroundTasks,
Body,
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests/client/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def test_refresh_if_signature_expired(rest: BlueapiRestClient):
mock_verify_token.side_effect = jwt.ExpiredSignatureError
mock_refresh_token.return_value = {"access_token": "new_token"}
result = rest.get_plans()
mock_verify_token.assert_called_once()
mock_refresh_token.assert_called_once()
assert result == PlanResponse(plans=[PlanModel.from_plan(plan)])


Expand Down

0 comments on commit d747a89

Please sign in to comment.