From a77a140ba6340c2f40c65abe19311bc0dc4cd504 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Wed, 27 Sep 2023 17:27:02 +0100 Subject: [PATCH] make sure cache is not used in tests --- src/tests/test_national.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/test_national.py b/src/tests/test_national.py index e7dd1e7..18f47e9 100644 --- a/src/tests/test_national.py +++ b/src/tests/test_national.py @@ -237,7 +237,8 @@ def test_read_latest_national_values_properties(db_session, api_client): app.dependency_overrides[get_session] = lambda: db_session - response = api_client.get("/v0/solar/GB/national/forecast") + # add test=test2 makes sure the cache is not used + response = api_client.get("/v0/solar/GB/national/forecast?test=test2") assert response.status_code == 200 national_forecast_values = [NationalForecastValue(**f) for f in response.json()]