Skip to content

Commit a8998f7

Browse files
committed
Implement tests with and without schemas
1 parent f92791c commit a8998f7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_kevsync.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,22 @@ async def test_connection_motor(db_uri, db_name):
1919
assert server_info["ok"] == 1.0, "Direct database ping failed"
2020

2121

22-
async def test_fetch_kev_data():
22+
async def test_fetch_kev_data_without_schema():
2323
kev_data = await fetch_kev_data(DEFAULT_KEV_URL)
2424
assert "vulnerabilities" in kev_data, "Expected 'vulnerabilities' in KEV data"
2525
assert (
2626
len(kev_data["vulnerabilities"]) > 0
2727
), "Expected at least one vulnerability item in KEV data"
2828

2929

30+
async def test_fetch_kev_data_with_schema():
31+
kev_data = await fetch_kev_data(DEFAULT_KEV_URL, DEFAULT_KEV_SCHEMA_URL)
32+
assert "vulnerabilities" in kev_data, "Expected 'vulnerabilities' in KEV data"
33+
assert (
34+
len(kev_data["vulnerabilities"]) > 0
35+
), "Expected at least one vulnerability item in KEV data"
36+
37+
3038
async def test_create_kev_doc():
3139
await create_kev_doc(VULN_1)
3240
# Attempt to find the newly created document

0 commit comments

Comments
 (0)