root: fix settings for managed not loaded

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-15 19:49:03 +01:00
parent 2666aa2c73
commit 867fb0dac0
2 changed files with 8 additions and 1 deletions

View File

@ -23,6 +23,13 @@ class TestRecovery(TestCase):
self.assertIn(token.key, out.getvalue()) self.assertIn(token.key, out.getvalue())
self.assertEqual(len(Token.objects.all()), 1) self.assertEqual(len(Token.objects.all()), 1)
def test_create_key_invalid(self):
"""Test creation of a new key (invalid)"""
out = StringIO()
self.assertEqual(len(Token.objects.all()), 0)
call_command("create_recovery_key", "1", "foo", stderr=out)
self.assertIn("not found", out.getvalue())
def test_recovery_view(self): def test_recovery_view(self):
"""Test recovery view""" """Test recovery view"""
out = StringIO() out = StringIO()

View File

@ -138,6 +138,7 @@ INSTALLED_APPS = [
"authentik.stages.user_logout", "authentik.stages.user_logout",
"authentik.stages.user_write", "authentik.stages.user_write",
"authentik.tenants", "authentik.tenants",
"authentik.managed",
"rest_framework", "rest_framework",
"django_filters", "django_filters",
"drf_spectacular", "drf_spectacular",
@ -573,6 +574,5 @@ if DEBUG:
os.environ[ENV_GIT_HASH_KEY] = "dev" os.environ[ENV_GIT_HASH_KEY] = "dev"
INSTALLED_APPS.append("authentik.core") INSTALLED_APPS.append("authentik.core")
INSTALLED_APPS.append("authentik.managed")
j_print("Booting authentik", version=__version__) j_print("Booting authentik", version=__version__)