|
5 | 5 |
|
6 | 6 | import django_dynamic_fixture as fixture
|
7 | 7 | from django.conf import settings
|
| 8 | +from django.core.cache import cache |
8 | 9 | from django.http import HttpResponse
|
9 | 10 | from django.test.utils import override_settings
|
10 | 11 | from django.urls import reverse
|
@@ -236,6 +237,11 @@ def test_project_nginx_serving_unicode_filename(self):
|
236 | 237 | class TestAdditionalDocViews(BaseDocServing):
|
237 | 238 | # Test that robots.txt and sitemap.xml work
|
238 | 239 |
|
| 240 | + def tearDown(self): |
| 241 | + super().tearDown() |
| 242 | + # Cleanup cache to avoid throttling on tests |
| 243 | + cache.clear() |
| 244 | + |
239 | 245 | @mock.patch('readthedocs.proxito.views.serve.get_storage_class')
|
240 | 246 | def test_default_robots_txt(self, storage_mock):
|
241 | 247 | storage_mock()().exists.return_value = False
|
@@ -326,7 +332,8 @@ def test_directory_indexes_get_args(self):
|
326 | 332 | self.project.versions.update(active=True, built=True)
|
327 | 333 | # Confirm we've serving from storage for the `index-exists/index.html` file
|
328 | 334 | response = self.client.get(
|
329 |
| - reverse('proxito_404_handler', kwargs={'proxito_path': '/en/latest/index-exists?foo=bar'}), |
| 335 | + reverse('proxito_404_handler', kwargs={ |
| 336 | + 'proxito_path': '/en/latest/index-exists?foo=bar'}), |
330 | 337 | HTTP_HOST='project.readthedocs.io',
|
331 | 338 | )
|
332 | 339 | self.assertEqual(
|
|
0 commit comments