From 86e1c10b084d06b591b001e32b28c3a89f4f9f97 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sun, 22 Oct 2023 16:39:17 +0200 Subject: [PATCH] check custom link_text --- tests/test_data_model.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_data_model.py b/tests/test_data_model.py index 4ffbf5b..2cbb954 100644 --- a/tests/test_data_model.py +++ b/tests/test_data_model.py @@ -706,6 +706,7 @@ class TestDataModel(unittest.TestCase): { "title": "My Custom Section 2", "entry_type": "NormalEntry", + "link_text": "My Custom Link Text", "entries": [ {"name": "My Custom Entry Name"}, {"name": "My Custom Entry Name"}, @@ -770,6 +771,10 @@ class TestDataModel(unittest.TestCase): cv = data_model.CurriculumVitae(**input) self.assertEqual(len(cv.sections), 5) + with self.subTest(msg="check link_text"): + cv = data_model.CurriculumVitae(**input) + self.assertEqual(cv.sections[1].link_text, "My Custom Link Text") + # Invalid section_order: input["section_order"] = ["invalid section"] with self.subTest(msg="invalid section_order"):