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

This commit is contained in:
Raphaël Vinot 2024-11-26 12:17:51 +01:00
parent e4a89948a4
commit 6db7ecf62a
2 changed files with 4 additions and 5 deletions

View file

@ -3,7 +3,6 @@
from __future__ import annotations
import logging
import functools
from datetime import date, datetime
from importlib.metadata import version
@ -68,14 +67,14 @@ class PyVulnerabilityLookup():
def redis_up(self) -> bool:
'''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()
# #### DB status ####
def get_info(self) -> dict[str, Any]:
'''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()
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 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()
# #### Comments ####

View file

@ -269,7 +269,7 @@ class TestPublic(unittest.TestCase):
return None
for login in ['login', 'user', 'username', 'help', 'test', 'about', 'administration', 'account']:
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.')
def test_users_info(self) -> None: