Skip to content

Commit 211d15b

Browse files
committed
Reorder test_parse_interesting_advisories test files
1 parent 457b165 commit 211d15b

2 files changed

Lines changed: 3 additions & 31 deletions

File tree

vulntotal/tests/test_data/gitlab/temp_vulntotal_gitlab_datasource/gemnasium-db-master-pypi-Jinja2/pypi/Jinja2/CVE-2019-8341.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

vulntotal/tests/test_gitlab.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ def test_parse_interesting_advisories(self, mock_fetch_yaml):
3636
# Mock the yaml file responses
3737
advisory_folder = Path(__file__).resolve().parent.joinpath("test_data/gitlab/temp_vulntotal_gitlab_datasource/gemnasium-db-master-pypi-Jinja2/pypi/Jinja2")
3838
yaml_files = []
39-
for file in advisory_folder.iterdir():
39+
sorted_files = sorted(advisory_folder.iterdir(), key=lambda x: x.name)
40+
for file in sorted_files:
4041
if file.suffix == '.yml':
4142
with open(file, 'r') as f:
4243
yaml_files.append(f.read())
4344

4445
mock_fetch_yaml.side_effect = yaml_files
4546

4647
purl = PackageURL("generic", "namespace", "test", "0.1.1")
47-
48+
4849
yml_files = [
4950
{"name": "CVE-2014-1402.yml", "path": "path/to/CVE-2014-1402.yml"},
5051
{"name": "CVE-2016-10745.yml", "path": "path/to/CVE-2016-10745.yml"},
51-
{"name": "CVE-2019-8341.yml", "path": "path/to/CVE-2019-8341.yml"},
5252
{"name": "CVE-2019-10906.yml", "path": "path/to/CVE-2019-10906.yml"},
5353
{"name": "CVE-2020-28493.yml", "path": "path/to/CVE-2020-28493.yml"}
5454
]

0 commit comments

Comments
 (0)