
This is even less of an issue since 411ef239f6
, since with that commit we only allow files that the listing returns
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
16 lines
507 B
Python
16 lines
507 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()
|