From 867fb0dac020b44623ec43f13d58847a29057220 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 15 Nov 2021 19:49:03 +0100 Subject: [PATCH] root: fix settings for managed not loaded Signed-off-by: Jens Langhammer --- authentik/recovery/tests.py | 7 +++++++ authentik/root/settings.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/authentik/recovery/tests.py b/authentik/recovery/tests.py index eea5549b0..ad53c6c5a 100644 --- a/authentik/recovery/tests.py +++ b/authentik/recovery/tests.py @@ -23,6 +23,13 @@ class TestRecovery(TestCase): self.assertIn(token.key, out.getvalue()) 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): """Test recovery view""" out = StringIO() diff --git a/authentik/root/settings.py b/authentik/root/settings.py index ba3246666..644e30e17 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -138,6 +138,7 @@ INSTALLED_APPS = [ "authentik.stages.user_logout", "authentik.stages.user_write", "authentik.tenants", + "authentik.managed", "rest_framework", "django_filters", "drf_spectacular", @@ -573,6 +574,5 @@ if DEBUG: os.environ[ENV_GIT_HASH_KEY] = "dev" INSTALLED_APPS.append("authentik.core") -INSTALLED_APPS.append("authentik.managed") j_print("Booting authentik", version=__version__)