[FIX]document_page_reference :error fix regarding the test script

This commit is contained in:
Anusha 2025-06-16 13:10:25 +02:00
parent ac6f8fdd28
commit 123a50e7a1

View File

@ -15,14 +15,9 @@ class TestDocumentReference(TransactionCase):
{"name": "Test Page 1", "content": "${r2}", "reference": "R1"}
)
cls.page2 = cls.page_obj.create(
{"name": "Test Page 1", "content": "${r1}", "reference": "r2"}
{"name": "Test Page 2", "content": "${r1}", "reference": "r2"}
)
def test_placeholder_replaced_with_html_link(self):
self.page1._compute_content_parsed()
parsed = str(self.page1.content_parsed)
self.assertIn(self.page2.display_name, parsed)
def test_constraints_duplicate_reference(self):
"""Should raise if reference is not unique (same as another)."""
with self.assertRaises(ValidationError):