From 6ace0ee43b1a2ad1d5f54f59c3df9afcffa9bea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Mon, 25 Nov 2024 11:58:06 +0100 Subject: [PATCH] chg: keep path inget_last --- pyvulnerabilitylookup/api.py | 2 +- tests/test_web.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvulnerabilitylookup/api.py b/pyvulnerabilitylookup/api.py index 3f418f3..ef23a76 100644 --- a/pyvulnerabilitylookup/api.py +++ b/pyvulnerabilitylookup/api.py @@ -121,7 +121,7 @@ class PyVulnerabilityLookup(): path /= source if number is not None: path /= str(number) - r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'vulnerability', 'last')))) + r = self.session.get(urljoin(self.root_url, str(PurePosixPath('api', 'vulnerability', path)))) return r.json() def get_vendors(self) -> list[str]: diff --git a/tests/test_web.py b/tests/test_web.py index 90d43da..16e5318 100644 --- a/tests/test_web.py +++ b/tests/test_web.py @@ -298,7 +298,7 @@ class TestPublic(unittest.TestCase): if not instance_config.get('registration'): return None - user = self.client.create_user(name='test Name', login='alan', + user = self.client.create_user(name='test Name', login='alan11111', organisation='test Organization', email='test@testorg.lu') self.assertTrue(user) self.assertTrue('id' in user, user)