Commit dc8272b5 authored by Jérome Perrin's avatar Jérome Perrin

test_check_software: update test to follow vulnerability database update

The vulnerability that this test was checking was removed from the
database, let's use another one that looks more likely to be removed.
parent 88bdb2d7
......@@ -157,19 +157,19 @@ class TestCheckSoftwareEggVulnerability(SlapOSStandaloneTestCase):
)
eggs_dir = os.path.join(software_dir, 'eggs')
os.makedirs(os.path.join(eggs_dir, 'Werkzeug-1.0.1-py3.7.egg', 'EGG-INFO'))
os.makedirs(os.path.join(eggs_dir, 'urllib3-1.22-py3.7.egg', 'EGG-INFO'))
with open(
os.path.join(
eggs_dir,
'Werkzeug-1.0.1-py3.7.egg',
'urllib3-1.22-py3.7.egg',
'EGG-INFO',
'PKG-INFO',
), 'w') as f:
f.write(
textwrap.dedent('''\
Metadata-Version: 2.1
Name: Werkzeug
Version: 1.0.1
Name: urllib3
Version: 1.22
'''))
develop_eggs_dir = os.path.join(software_dir, 'develop-eggs')
......@@ -206,7 +206,7 @@ class TestCheckSoftwareEggVulnerability(SlapOSStandaloneTestCase):
warning, = [w for w in warning_context if 'vulnerable' in str(w.message)]
self.assertIn(
'Werkzeug version 2.0.2 improves the security of the debugger cookies',
'urllib3 before version 1.23 does not remove the Authorization HTTP header when',
str(warning.message),
)
self.assertIn(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment