authentik.events.tests.test_models
authentik event models tests
1"""authentik event models tests""" 2 3from collections.abc import Callable 4 5from django.db.models import Model 6from django.test import TestCase 7 8from authentik.core.models import default_token_key 9from authentik.events.models import default_event_duration 10from authentik.lib.utils.reflection import get_apps 11 12 13class TestModels(TestCase): 14 """Test Models""" 15 16 17def model_tester_factory(test_model: type[Model]) -> Callable: 18 """Test models' __str__ and __repr__""" 19 20 def tester(self: TestModels): 21 allowed = 0 22 # Token-like objects need to lookup the current tenant to get the default token length 23 for field in test_model._meta.fields: 24 if field.default in [default_token_key, default_event_duration]: 25 allowed += 1 26 with self.assertNumQueries(allowed): 27 str(test_model()) 28 with self.assertNumQueries(allowed): 29 repr(test_model()) 30 31 return tester 32 33 34for app in get_apps(): 35 for model in app.get_models(): 36 setattr(TestModels, f"test_{app.label}_{model.__name__}", model_tester_factory(model))
Test Models
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model())
The type of the None singleton.
18def model_tester_factory(test_model: type[Model]) -> Callable: 19 """Test models' __str__ and __repr__""" 20 21 def tester(self: TestModels): 22 allowed = 0 23 # Token-like objects need to lookup the current tenant to get the default token length 24 for field in test_model._meta.fields: 25 if field.default in [default_token_key, default_event_duration]: 26 allowed += 1 27 with self.assertNumQueries(allowed): 28 str(test_model()) 29 with self.assertNumQueries(allowed): 30 repr(test_model()) 31 32 return tester
Test models' __str__ and __repr__