diff --git a/readthedocs/api/v3/tests/test_projects.py b/readthedocs/api/v3/tests/test_projects.py index 17d7d3db517..e37fddeef67 100644 --- a/readthedocs/api/v3/tests/test_projects.py +++ b/readthedocs/api/v3/tests/test_projects.py @@ -4,6 +4,7 @@ from pathlib import Path +from django.core.cache import cache from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse @@ -101,6 +102,10 @@ def setUp(self): self.client = APIClient() + def tearDown(self): + # Cleanup cache to avoid throttling on tests + cache.clear() + def _get_response_dict(self, view_name): filename = Path(__file__).absolute().parent / 'responses' / f'{view_name}.json' return json.load(open(filename))