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.admin.utils import get_system_settings
 9from authentik.core.models import default_token_key
10from authentik.events.models import default_event_duration
11from authentik.lib.utils.reflection import get_apps
12
13
14class TestModels(TestCase):
15    """Test Models"""
16
17
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        get_system_settings.cache_clear()
28        with self.assertNumQueries(allowed):
29            str(test_model())
30        get_system_settings.cache_clear()
31        with self.assertNumQueries(allowed):
32            repr(test_model())
33
34    return tester
35
36
37for app in get_apps():
38    for model in app.get_models():
39        setattr(TestModels, f"test_{app.label}_{model.__name__}", model_tester_factory(model))
class TestModels(django.test.testcases.TestCase):
15class TestModels(TestCase):
16    """Test Models"""

Test Models

def test_authentik_tasks_Task(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_tasks_TaskDependency(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_tasks_TaskLog(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_tasks_WorkerStatus(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_admin_SystemSettings(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_admin_VersionHistory(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_Group(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_GroupParentageNode(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_GroupAncestryNode(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_User(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_Provider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_Application(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_ApplicationEntitlement(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_Source(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_UserSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_GroupSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_Token(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_PropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_SourceUserPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_SourceGroupPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_ProviderPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_UserRole(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_GroupRole(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_UserGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_Session(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_UserSwitchingSession(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_AuthenticatedSession(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_ObjectAttribute(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_Actor(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_UserActivity(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_core_ProxySource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_crypto_CertificateKeyPair(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_Device(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_DeviceUserBinding(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_DeviceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_DeviceFactSnapshot(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_Connector(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_DeviceAccessGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_EndpointStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AgentConnector(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AgentConnectorJWTFederationProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AgentDeviceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AgentDeviceUserBinding(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_DeviceToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_EnrollmentToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_DeviceAuthenticationToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AppleNonce(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AppleAuthorizationCode(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AppleUnlockKey(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_agent_AppleIndependentSecureEnclave(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_enterprise_License(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_enterprise_LicenseUsage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_events_Event(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_events_NotificationTransport(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_events_Notification(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_events_NotificationRule(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_events_NotificationRuleNotificationTransport(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_events_NotificationWebhookMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_flows_Stage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_flows_Flow(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_flows_FlowStageBinding(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_flows_FlowToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_outposts_OutpostServiceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_outposts_DockerServiceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_outposts_KubernetesServiceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_outposts_Outpost(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_outposts_OutpostProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_dummy_DummyPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_event_matcher_EventMatcherPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_expiry_PasswordExpiryPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_expression_ExpressionPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_geoip_GeoIPPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_password_PasswordPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_reputation_ReputationPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_reputation_Reputation(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_PolicyBindingModel(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_PolicyBinding(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_Policy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_ldap_LDAPProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_ScopeMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_OAuth2Provider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_OAuth2ProviderJWTFederationSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_OAuth2ProviderJWTFederationProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_AuthorizationCode(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_AccessToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_RefreshToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_OAuth2SessionLogin(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_DeviceToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_OAuth2DynamicClientRegistration(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_oauth2_DynamicClientRegistrationPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_proxy_ProxySession(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_proxy_ProxyProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_rac_RACProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_rac_RACPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_rac_RACConnectionOverride(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_rac_ConnectionToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_radius_RadiusProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_radius_RadiusProviderPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_saml_SAMLProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_saml_SAMLProviderJWTFederationProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_saml_SAMLPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_saml_SAMLSession(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_scim_SCIMProviderUser(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_scim_SCIMProviderGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_scim_SCIMProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_scim_SCIMProviderGroupFilter(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_scim_SCIMProviderGroupPropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_scim_SCIMMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_rbac_Role(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_rbac_InitialPermissions(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_rbac_InitialPermissionsPermission(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_rbac_SystemPermission(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_rbac_CustomPermission(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_rbac_PermissionCheck(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_kerberos_KerberosSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_kerberos_KerberosSourcePropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_kerberos_UserKerberosSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_kerberos_GroupKerberosSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_ldap_LDAPSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_ldap_LDAPSourcePropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_ldap_UserLDAPSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_ldap_GroupLDAPSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_oauth_OAuthSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_oauth_OAuthSourcePropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_oauth_UserOAuthSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_oauth_GroupOAuthSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_plex_PlexSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_plex_PlexSourcePropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_plex_UserPlexSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_plex_GroupPlexSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_saml_SAMLSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_saml_SAMLSourcePropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_saml_UserSAMLSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_saml_GroupSAMLSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_scim_SCIMSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_scim_SCIMSourcePropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_scim_SCIMSourceUser(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_scim_SCIMSourceGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_telegram_TelegramSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_telegram_TelegramSourcePropertyMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_telegram_UserTelegramSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_sources_telegram_GroupTelegramSourceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_duo_AuthenticatorDuoStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_duo_DuoDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_email_AuthenticatorEmailStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_email_EmailDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_sms_AuthenticatorSMSStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_sms_SMSDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_static_AuthenticatorStaticStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_static_StaticDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_static_StaticToken(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_totp_AuthenticatorTOTPStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_totp_TOTPDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_validate_AuthenticatorValidateStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_validate_AuthenticatorValidateStageConfigurationStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_validate_AuthenticatorValidateStageWebAuthnAllowedDeviceType(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_webauthn_AuthenticatorWebAuthnStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_webauthn_WebAuthnDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_webauthn_WebAuthnDeviceType(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_webauthn_AuthenticatorWebAuthnStageDeviceTypeRestriction(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_captcha_CaptchaStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_deny_DenyStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_dummy_DummyStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_email_EmailStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_identification_IdentificationStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_identification_IdentificationStageSource(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_invitation_InvitationStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_invitation_Invitation(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_password_PasswordStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_password_PasswordDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_prompt_Prompt(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_prompt_PromptStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_prompt_PromptStageField(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_prompt_PromptStageValidationPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_redirect_RedirectStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_user_delete_UserDeleteStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_user_login_UserLoginStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_user_logout_UserLogoutStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_user_write_UserWriteStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_tasks_schedules_Schedule(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_brands_Brand(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_brands_BrandClientCertificate(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_blueprints_BlueprintInstance(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_agents_Agent(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_fleet_FleetConnector(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_google_chrome_GoogleChromeConnector(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_microsoft_intune_MicrosoftIntuneConnector(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_endpoints_connectors_microsoft_intune_MicrosoftIntuneConnectorCertificateAuthority(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_LifecycleRule(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_LifecycleRuleReviewerGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_LifecycleRuleReviewer(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_LifecycleRuleNotificationTransport(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_LifecycleIteration(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_Review(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_UserOffboarding(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_UserExpirationRule(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_lifecycle_UserExpirationRuleNotificationTransport(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_unique_password_UniquePasswordPolicy(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_policies_unique_password_UserPasswordHistory(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_google_workspace_GoogleWorkspaceProviderUser(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_google_workspace_GoogleWorkspaceProviderGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_google_workspace_GoogleWorkspaceProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_google_workspace_GoogleWorkspaceProviderGroupFilter(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_google_workspace_GoogleWorkspaceProviderPropertyMappingsGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_google_workspace_GoogleWorkspaceProviderMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_microsoft_entra_MicrosoftEntraProviderUser(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_microsoft_entra_MicrosoftEntraProviderGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_microsoft_entra_MicrosoftEntraProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_microsoft_entra_MicrosoftEntraProviderGroupFilter(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_microsoft_entra_MicrosoftEntraProviderPropertyMappingsGroup(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_microsoft_entra_MicrosoftEntraProviderMapping(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_ssf_SSFProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_ssf_SSFProviderOIDCAuthProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_ssf_Stream(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_ssf_StreamEvent(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_providers_ws_federation_WSFederationProvider(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_reports_DataExport(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_requests_RequestRuleChildBinding(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_requests_RequestRuleBinding(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_requests_RequestRule(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_requests_RequestRuleNotificationTransport(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_requests_GrantRequest(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_requests_GrantRequestTarget(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_requests_GrantRequestApproval(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_account_lockdown_AccountLockdownStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_endpoint_gdtc_AuthenticatorEndpointGDTCStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_endpoint_gdtc_EndpointDevice(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_authenticator_endpoint_gdtc_EndpointDeviceConnection(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_mtls_MutualTLSStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_mtls_MutualTLSStageCertificateAuthority(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def test_authentik_stages_source_SourceStage(self: TestModels):
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())

The type of the None singleton.

def model_tester_factory(test_model: type[django.db.models.base.Model]) -> Callable:
19def model_tester_factory(test_model: type[Model]) -> Callable:
20    """Test models' __str__ and __repr__"""
21
22    def tester(self: TestModels):
23        allowed = 0
24        # Token-like objects need to lookup the current tenant to get the default token length
25        for field in test_model._meta.fields:
26            if field.default in [default_token_key, default_event_duration]:
27                allowed += 1
28        get_system_settings.cache_clear()
29        with self.assertNumQueries(allowed):
30            str(test_model())
31        get_system_settings.cache_clear()
32        with self.assertNumQueries(allowed):
33            repr(test_model())
34
35    return tester

Test models' __str__ and __repr__