managed: add tests
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
357bd65028
commit
d5341c2284
|
@ -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)]))
|
||||
|
|
|
@ -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
|
Reference in New Issue