From d747a89bfc838e914d5dcfc54620004773407d59 Mon Sep 17 00:00:00 2001 From: Zoheb Shaikh Date: Thu, 17 Oct 2024 16:48:20 +0100 Subject: [PATCH] added more checks in the code --- src/blueapi/service/main.py | 1 - tests/unit_tests/client/test_rest.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blueapi/service/main.py b/src/blueapi/service/main.py index 2e698b940..18ecf2f65 100644 --- a/src/blueapi/service/main.py +++ b/src/blueapi/service/main.py @@ -2,7 +2,6 @@ from contextlib import asynccontextmanager from typing import Any -from dotenv import load_dotenv from fastapi import ( BackgroundTasks, Body, diff --git a/tests/unit_tests/client/test_rest.py b/tests/unit_tests/client/test_rest.py index 4c909370b..6bc25d22f 100644 --- a/tests/unit_tests/client/test_rest.py +++ b/tests/unit_tests/client/test_rest.py @@ -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)])