From 81cad3e4ad5baf1ca788bcd027cb6952d064fef7 Mon Sep 17 00:00:00 2001 From: drodarie Date: Sun, 16 Jun 2024 12:13:18 +0200 Subject: [PATCH] Fix unittest for merging. --- tests/test_parsers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_parsers.py b/tests/test_parsers.py index 7fd74776..2caf0335 100644 --- a/tests/test_parsers.py +++ b/tests/test_parsers.py @@ -231,7 +231,11 @@ def test_import_overwrite(self): ) self.assertEqual(10, tree["imp"]["importable"]) - def test_outdoc_import_merge(self): + @patch("bsb.config.parsers.get_configuration_parser_classes") + def test_outdoc_import_merge(self, get_content_mock): + # Override get_configuration_parser to manually register RefParserMock + get_content_mock.return_value = {"txt": RefParserMock, "bla": RefParserMock2} + file = "outdoc_import_merge.txt" tree, meta = self.parser.parse( get_content(file), path=pathlib.Path(__file__).parent / "data/configs" / file