check custom link_text

This commit is contained in:
Sina Atalay 2023-10-22 16:39:17 +02:00
parent da6d3135d1
commit 86e1c10b08
1 changed files with 5 additions and 0 deletions

View File

@ -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"):