We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2f199a commit 4cfa862Copy full SHA for 4cfa862
tests/test_query.py
@@ -1,4 +1,5 @@
1
import pickle
2
+import warnings
3
4
from django.apps import apps
5
from django.contrib.contenttypes.models import ContentType
@@ -49,6 +50,10 @@ def setUpTestData(cls):
49
50
tests_models = tuple(apps.get_app_config("tests").get_models())
51
ContentType.objects.get_for_models(*tests_models, for_concrete_models=True)
52
53
+ def setUp(self):
54
+ warnings.filterwarnings("error", category=UnsealedAttributeAccess)
55
+ self.addCleanup(warnings.resetwarnings)
56
+
57
def test_state_sealed_assigned(self):
58
instance = SeaLion.objects.seal().get()
59
self.assertTrue(instance._state.sealed)
0 commit comments