From 70f256783e18ab4cb29d26a8a10b71bb3789d612 Mon Sep 17 00:00:00 2001 From: Lennard Strohmeyer <lennard.strohmeyer@digitallearning.gmbh> Date: Fri, 20 Dec 2024 09:03:41 +0100 Subject: [PATCH] hotfix for broken test case --- src/xapi/tests/tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xapi/tests/tests.py b/src/xapi/tests/tests.py index f52de6a..273eb68 100644 --- a/src/xapi/tests/tests.py +++ b/src/xapi/tests/tests.py @@ -963,7 +963,7 @@ class TextxAPIAdditionalLrs(BaseTestCase): @patch("xapi.views.requests.post") def test_xapi_additional_lrs(self, mock_post): """ - Ensure xAPI statement is matched by object definition type. + Ensure xAPI statement is forwarded to external LRS if configured in provider schema. """ # Create provider @@ -1039,5 +1039,6 @@ class TextxAPIAdditionalLrs(BaseTestCase): response.json()["message"], "xAPI statements successfully stored in LRS" ) mock_post.assert_called_once() - self.assertEqual(self.captured_json, self.statement) + if isinstance(self.captured_json, list): self.assertEqual(self.captured_json, [self.statement]) + else: self.assertEqual(self.captured_json, self.statement) self.assertEqual(self.captured_headers, self.additional_lrs_auth_headers) -- GitLab