From 7685e2510e5c6eee4860da9cf752147e4c3b510a Mon Sep 17 00:00:00 2001 From: Florian Wilhelm Date: Tue, 14 May 2024 20:11:56 +0200 Subject: [PATCH] test --- tests/data/test_dist_cpe.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/data/test_dist_cpe.py b/tests/data/test_dist_cpe.py index 54b343e..7cddde4 100644 --- a/tests/data/test_dist_cpe.py +++ b/tests/data/test_dist_cpe.py @@ -48,11 +48,19 @@ def test_invalid(self) -> None: class TestDistCpeMapperGardenlinux: - def test_valid(self) -> None: + @pytest.mark.parametrize( + 'codename,version', + [ + ('1443', '1443.3'), + ('today', 'today'), + ('', ''), + ], + ) + def test_valid(self, codename: str, version: str) -> None: m = DistCpeMapper.new('gardenlinux') - c = m('999.9') + c = m(codename) assert c.cpe_vendor == 'sap' assert c.cpe_product == 'gardenlinux' - assert c.cpe_version == '999.9' - assert c.deb_codename == '999.9' + assert c.cpe_version == version + assert c.deb_codename == codename