diff --git a/authentik/managed/tasks.py b/authentik/managed/tasks.py index 978b458b0..5d2ebd996 100644 --- a/authentik/managed/tasks.py +++ b/authentik/managed/tasks.py @@ -20,5 +20,5 @@ def managed_reconcile(self: MonitoredTask): self.set_status( TaskResult(TaskResultStatus.SUCCESSFUL, ["Successfully updated managed models."]) ) - except DatabaseError as exc: + except DatabaseError as exc: # pragma: no cover self.set_status(TaskResult(TaskResultStatus.WARNING, [str(exc)])) diff --git a/authentik/managed/tests.py b/authentik/managed/tests.py new file mode 100644 index 000000000..85c859ffe --- /dev/null +++ b/authentik/managed/tests.py @@ -0,0 +1,13 @@ +"""managed tests""" +from django.test import TestCase + +from authentik.managed.tasks import managed_reconcile + + +class TestManaged(TestCase): + """managed tests""" + + def test_reconcile(self): + """Test reconcile""" + # pyright: reportGeneralTypeIssues=false + managed_reconcile() # pylint: disable=no-value-for-parameter