From 0b0e08446d8bdbc83d44f97ad6550cf547eeb38f Mon Sep 17 00:00:00 2001 From: Jens L Date: Sun, 30 Apr 2023 14:08:36 +0300 Subject: [PATCH] blueprints: fix tests (#5421) Signed-off-by: Jens Langhammer --- authentik/blueprints/tests/test_v1_api.py | 5 ++++- authentik/blueprints/v1/importer.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/authentik/blueprints/tests/test_v1_api.py b/authentik/blueprints/tests/test_v1_api.py index 276ac3abf..33bdd1b03 100644 --- a/authentik/blueprints/tests/test_v1_api.py +++ b/authentik/blueprints/tests/test_v1_api.py @@ -67,4 +67,7 @@ class TestBlueprintsV1API(APITestCase): }, ) 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"]}, + ) diff --git a/authentik/blueprints/v1/importer.py b/authentik/blueprints/v1/importer.py index ed900bc38..7dcfbe517 100644 --- a/authentik/blueprints/v1/importer.py +++ b/authentik/blueprints/v1/importer.py @@ -299,7 +299,7 @@ class Importer: orig_import = deepcopy(self.__import) if self.__import.version != 1: self.logger.warning("Invalid blueprint version") - return False, [] + return False, [{"event": "Invalid blueprint version"}] with ( transaction_rollback(), capture_logs() as logs,