From 5dbb18a7a10d14932b67e7175a065a7663280be2 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Sat, 13 Jul 2024 13:20:54 -0400 Subject: [PATCH] fix: tweak query count behavior (not sure if this is safe) --- tests/test_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 072c765..3c11150 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -529,9 +529,8 @@ def test_get_dates_for_course_query_counts(self, has_schedule, pass_user_object, course_id=self.course.id, user=user, schedule=schedule ) - # Second time, the request cache eliminates all querying (sometimes)... - # If a schedule is not provided, we will get the schedule to avoid caching outdated dates - with self.assertNumQueries(0 if schedule else 1): + # Second time, the request cache eliminates all querying... + with self.assertNumQueries(0): cached_dates = api.get_dates_for_course( course_id=self.course.id, user=user, schedule=schedule )