Skip to content

Commit 6db7ecf

Browse files
committed
fix: incorrect call for searching vendor and product
1 parent e4a8994 commit 6db7ecf

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pyvulnerabilitylookup/api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
import logging
6-
import functools
76

87
from datetime import date, datetime
98
from importlib.metadata import version
@@ -68,14 +67,14 @@ def is_up(self) -> bool:
6867

6968
def redis_up(self) -> bool:
7069
'''Check if redis is up and running'''
71-
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system','redis_up'))))
70+
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system', 'redis_up'))))
7271
return r.json()
7372

7473
# #### DB status ####
7574

7675
def get_info(self) -> dict[str, Any]:
7776
'''Get more information about the current databases in use and when it was updated'''
78-
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system','dbInfo'))))
77+
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system', 'dbInfo'))))
7978
return r.json()
8079

8180
def get_config_info(self) -> dict[str, Any]:
@@ -143,7 +142,7 @@ def get_vendor_product_vulnerabilities(self, vendor: str, product: str) -> list[
143142
:param vendor: A vendor owning products (must be in the known vendor list)
144143
:param product: A product owned by that vendor
145144
'''
146-
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'vulnerability', 'browse', vendor, product))))
145+
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'vulnerability', 'search', vendor, product))))
147146
return r.json()
148147

149148
# #### Comments ####

tests/test_web.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_create_user_not_allowed_login(self) -> None:
269269
return None
270270
for login in ['login', 'user', 'username', 'help', 'test', 'about', 'administration', 'account']:
271271
user = self.client.create_user(name='test Name', login=login,
272-
organisation='test Organization', email='[email protected]')
272+
organisation='test Organization', email='[email protected]')
273273
self.assertEqual(user['message'], 'Username not allowed.')
274274

275275
def test_users_info(self) -> None:

0 commit comments

Comments
 (0)