mirror of
https://github.com/cve-search/PyVulnerabilityLookup.git
synced 2025-01-18 18:46:19 +00:00
fix: incorrect call for searching vendor and product
Some checks failed
Python application - MyPy / Python 3.12 sample (push) Has been cancelled
Python application - MyPy / Python 3.13 sample (push) Has been cancelled
Python application - MyPy / Python 3.10 sample (push) Has been cancelled
Python application - MyPy / Python 3.11 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.11 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.10 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.12 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.13 sample (push) Has been cancelled
Some checks failed
Python application - MyPy / Python 3.12 sample (push) Has been cancelled
Python application - MyPy / Python 3.13 sample (push) Has been cancelled
Python application - MyPy / Python 3.10 sample (push) Has been cancelled
Python application - MyPy / Python 3.11 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.11 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.10 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.12 sample (push) Has been cancelled
Python application - Test Public Interface / Python 3.13 sample (push) Has been cancelled
This commit is contained in:
parent
e4a89948a4
commit
6db7ecf62a
2 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,6 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import functools
|
|
||||||
|
|
||||||
from datetime import date, datetime
|
from datetime import date, datetime
|
||||||
from importlib.metadata import version
|
from importlib.metadata import version
|
||||||
|
@ -68,14 +67,14 @@ class PyVulnerabilityLookup():
|
||||||
|
|
||||||
def redis_up(self) -> bool:
|
def redis_up(self) -> bool:
|
||||||
'''Check if redis is up and running'''
|
'''Check if redis is up and running'''
|
||||||
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system','redis_up'))))
|
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system', 'redis_up'))))
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
# #### DB status ####
|
# #### DB status ####
|
||||||
|
|
||||||
def get_info(self) -> dict[str, Any]:
|
def get_info(self) -> dict[str, Any]:
|
||||||
'''Get more information about the current databases in use and when it was updated'''
|
'''Get more information about the current databases in use and when it was updated'''
|
||||||
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system','dbInfo'))))
|
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'system', 'dbInfo'))))
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
def get_config_info(self) -> dict[str, Any]:
|
def get_config_info(self) -> dict[str, Any]:
|
||||||
|
@ -143,7 +142,7 @@ class PyVulnerabilityLookup():
|
||||||
:param vendor: A vendor owning products (must be in the known vendor list)
|
:param vendor: A vendor owning products (must be in the known vendor list)
|
||||||
:param product: A product owned by that vendor
|
:param product: A product owned by that vendor
|
||||||
'''
|
'''
|
||||||
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'vulnerability', 'browse', vendor, product))))
|
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'vulnerability', 'search', vendor, product))))
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
# #### Comments ####
|
# #### Comments ####
|
||||||
|
|
|
@ -269,7 +269,7 @@ class TestPublic(unittest.TestCase):
|
||||||
return None
|
return None
|
||||||
for login in ['login', 'user', 'username', 'help', 'test', 'about', 'administration', 'account']:
|
for login in ['login', 'user', 'username', 'help', 'test', 'about', 'administration', 'account']:
|
||||||
user = self.client.create_user(name='test Name', login=login,
|
user = self.client.create_user(name='test Name', login=login,
|
||||||
organisation='test Organization', email='test@testorg.local')
|
organisation='test Organization', email='test@testorg.local')
|
||||||
self.assertEqual(user['message'], 'Username not allowed.')
|
self.assertEqual(user['message'], 'Username not allowed.')
|
||||||
|
|
||||||
def test_users_info(self) -> None:
|
def test_users_info(self) -> None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue