Skip to content

Commit

Permalink
Add unit tests for the translation methods of the new fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pieqq committed Feb 13, 2024
1 parent f2dc015 commit 989c0f6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions checkbox-ng/plainbox/impl/unit/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,24 @@ def test_template_description(self):
}).template_description, "description")

def test_tr_template_summary(self):
template = TemplateUnit({
"_template-summary": "summary",
})
self.assertEqual(template.tr_template_summary(), "summary")

def test_translated_template_summary(self):
"""Ensure template_summary is populated with the translated field."""
self.assertEqual(TemplateUnit({
"_template-summary": "summary",
}).template_summary, "summary")

def test_tr_template_description(self):
template = TemplateUnit({
"_template-description": "description",
})
self.assertEqual(template.tr_template_description(), "description")

def test_translated_template_description(self):
"""
Ensure template_description is populated with the translated field.
"""
Expand Down

0 comments on commit 989c0f6

Please sign in to comment.