
* format files Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix pyright Signed-off-by: Jens Langhammer <jens@goauthentik.io> * revert #8367 Signed-off-by: Jens Langhammer <jens@goauthentik.io> * sigh Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
17 lines
508 B
Python
17 lines
508 B
Python
"""authentik managed models tests"""
|
|
|
|
from django.test import TestCase
|
|
|
|
from authentik.blueprints.models import BlueprintInstance, BlueprintRetrievalFailed
|
|
from authentik.lib.generators import generate_id
|
|
|
|
|
|
class TestModels(TestCase):
|
|
"""Test Models"""
|
|
|
|
def test_retrieve_file(self):
|
|
"""Test retrieve_file"""
|
|
instance = BlueprintInstance.objects.create(name=generate_id(), path="../etc/hosts")
|
|
with self.assertRaises(BlueprintRetrievalFailed):
|
|
instance.retrieve()
|