We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8b9ad7 commit 229e408Copy full SHA for 229e408
netbox_custom_objects/tests/base.py
@@ -23,6 +23,13 @@ def setUp(self):
23
self.client = Client()
24
self.client.force_login(self.user)
25
26
+ def tearDown(self):
27
+ """Clean up after each test."""
28
+ # Clear the model cache to ensure test isolation
29
+ # This prevents cached models with deleted fields from affecting other tests
30
+ CustomObjectType.clear_model_cache()
31
+ super().tearDown()
32
+
33
@classmethod
34
def create_custom_object_type(cls, **kwargs):
35
"""Helper method to create a custom object type."""
0 commit comments