Skip to content

Commit 7493213

Browse files
committed
Drop suse oval importer v1
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent 4171dbe commit 7493213

File tree

8 files changed

+0
-678
lines changed

8 files changed

+0
-678
lines changed

vulnerabilities/importers/suse_oval.py

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

vulnerabilities/tests/test_data/suse_oval/mock-definitions-only.xml

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

vulnerabilities/tests/test_data/suse_oval/org.opensuse.CVE-2008-5679-modified-versions.xml

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

vulnerabilities/tests/test_data/suse_oval/org.opensuse.CVE-2008-5679.xml

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

vulnerabilities/tests/test_data/suse_oval/suse-oval-CVE-2008-5679-expected.json

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

vulnerabilities/tests/test_data_source.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
3232
TEST_DATA = os.path.join(BASE_DIR, "test_data/")
33-
TEST_DATA_01 = os.path.join(BASE_DIR, "test_data/suse_oval")
3433

3534

3635
def load_oval_data():
@@ -136,28 +135,3 @@ def test_git_importer_clone(git_importer):
136135
list(git_importer().advisory_data())
137136
mock_fetch.assert_called_once()
138137
mock_delete.assert_called_once()
139-
140-
141-
# Here we use a modified copy of org.opensuse.CVE-2008-5679.xml -- the test versions are modified to illustrate sort order.
142-
def test_ovaltest_sorting():
143-
xml_doc = ET.parse(
144-
os.path.join(TEST_DATA_01, "org.opensuse.CVE-2008-5679-modified-versions.xml")
145-
)
146-
translations = {"less than": "<", "equals": "=", "greater than or equal": ">="}
147-
parsed_oval = OvalParser(translations, xml_doc)
148-
149-
# Get the list of all tests and check the total number of tests.
150-
get_all_tests = parsed_oval.oval_document.getTests()
151-
152-
# Check the order of the four tests in the sorted `get_all_tests` list. (Testing suggests that the
153-
# original list of tests, `get_all_tests`, is unsorted and is ordered in the same order as the test
154-
# elements appear in the .xml file.)
155-
sorted_tests = sorted(get_all_tests)
156-
test_results = [(test.getId(), test.getVersion()) for test in sorted_tests]
157-
expected = [
158-
("oval:org.opensuse.security:tst:2009030401", "1"),
159-
("oval:org.opensuse.security:tst:2009030403", "4"),
160-
("oval:org.opensuse.security:tst:2009030402", "9"),
161-
("oval:org.opensuse.security:tst:2009030400", "11"),
162-
]
163-
assert test_results == expected

0 commit comments

Comments
 (0)