mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Clear cache for more unit tests (#3184)
This commit is contained in:
		| @@ -245,6 +245,11 @@ class SettingsTest(InvenTreeTestCase): | ||||
| class GlobalSettingsApiTest(InvenTreeAPITestCase): | ||||
|     """Tests for the global settings API.""" | ||||
|  | ||||
|     def setUp(self): | ||||
|         """Ensure cache is cleared as part of test setup""" | ||||
|         cache.clear() | ||||
|         return super().setUp() | ||||
|  | ||||
|     def test_global_settings_api_list(self): | ||||
|         """Test list URL for global settings.""" | ||||
|         url = reverse('api-global-setting-list') | ||||
|   | ||||
| @@ -4,6 +4,7 @@ import os | ||||
| import shutil | ||||
|  | ||||
| from django.conf import settings | ||||
| from django.core.cache import cache | ||||
| from django.http.response import StreamingHttpResponse | ||||
| from django.urls import reverse | ||||
|  | ||||
| @@ -33,6 +34,11 @@ class ReportTest(InvenTreeAPITestCase): | ||||
|     detail_url = None | ||||
|     print_url = None | ||||
|  | ||||
|     def setUp(self): | ||||
|         """Ensure cache is cleared as part of test setup""" | ||||
|         cache.clear() | ||||
|         return super().setUp() | ||||
|  | ||||
|     def copyReportTemplate(self, filename, description): | ||||
|         """Copy the provided report template into the required media directory.""" | ||||
|         src_dir = os.path.join( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user