Skip to content

Commit

Permalink
test: add test for sanitize_packages
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Drung <bdrung@posteo.de>
  • Loading branch information
bdrung committed Sep 23, 2023
1 parent 39b9f69 commit 77d1707
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,13 @@ def test_loading(self):
},
)

def test_sanitize_packages_duplicates(self) -> None:
"""Test sanitize_packages method: remove duplicates."""
config = Config()
config["mmdebstrap"] = {"packages": ["less/jammy-updates", "more", "less=590-1build1"]}
config.sanitize_packages()
self.assertEqual(config["mmdebstrap"]["packages"], ["less=590-1build1", "more"])

def test_yaml_rendering(self):
"""Test that config.yaml is formatted correctly."""
config = Config()
Expand Down

0 comments on commit 77d1707

Please sign in to comment.