Skip to content

Commit

Permalink
Increased test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fernando79513 committed Jan 10, 2024
1 parent 745a06d commit df6635b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions checkbox-ng/plainbox/impl/unit/test_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,24 @@ def test_malformed_versions(self):
with self.assertRaises(SystemExit) as context:
compare_versions("== ***", "1.0.0")

def test_unit_to_string(self):
unit = PackagingMetaDataUnit(
{
"os-id": "ubuntu",
"os-version-id": "22.04",
"Depends": "dep_package",
"Recommends": "rec_package",
"Suggests": "sug_package",
}
)

unit_string = str(unit)

self.assertIn("ubuntu", unit_string)
self.assertIn("Depends: dep_package", unit_string)
self.assertIn("Recommends: rec_package", unit_string)
self.assertIn("Suggests: sug_package", unit_string)


class PackagingUnitFieldValidationTests(UnitFieldValidationTests):
def test_validation_unique_package(self):
Expand Down

0 comments on commit df6635b

Please sign in to comment.