blueprints: fix tests (#5421)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
1913b5ec41
commit
0b0e08446d
|
@ -67,4 +67,7 @@ class TestBlueprintsV1API(APITestCase):
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
self.assertEqual(res.status_code, 400)
|
self.assertEqual(res.status_code, 400)
|
||||||
self.assertJSONEqual(res.content.decode(), {"content": ["Failed to validate blueprint"]})
|
self.assertJSONEqual(
|
||||||
|
res.content.decode(),
|
||||||
|
{"content": ["Failed to validate blueprint: Invalid blueprint version"]},
|
||||||
|
)
|
||||||
|
|
|
@ -299,7 +299,7 @@ class Importer:
|
||||||
orig_import = deepcopy(self.__import)
|
orig_import = deepcopy(self.__import)
|
||||||
if self.__import.version != 1:
|
if self.__import.version != 1:
|
||||||
self.logger.warning("Invalid blueprint version")
|
self.logger.warning("Invalid blueprint version")
|
||||||
return False, []
|
return False, [{"event": "Invalid blueprint version"}]
|
||||||
with (
|
with (
|
||||||
transaction_rollback(),
|
transaction_rollback(),
|
||||||
capture_logs() as logs,
|
capture_logs() as logs,
|
||||||
|
|
Reference in New Issue