Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe committed May 14, 2024
1 parent 0cf41e1 commit 7685e25
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/data/test_dist_cpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7685e25

Please sign in to comment.