Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions project_task_description_template/tests/test_project_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ def setUpClass(cls):
)

def test_onchange_description_template_id(self):
record = self.model.new({"description": "<p>Existing Description</p>"})
existing = Markup("<p>Existing Description</p>")
record = self.model.new({"description": existing})
record.description_template_id = self.description_template
record._onchange_description_template_id()
self.assertEqual(
record.description,
Markup("<p>Existing Description</p><span>- Sample Description</span>"),
existing + self.description_template.description,
"Onchange method failed to append description correctly.",
)

Expand All @@ -31,6 +32,6 @@ def test_onchange_with_empty_description(self):
record._onchange_description_template_id()
self.assertEqual(
record.description,
Markup("<span>- Sample Description</span>"),
self.description_template.description,
"Onchange method failed with empty initial description.",
)
Loading