From c01d1c54607b2d904a9960dd657ca0129d73589c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Thu, 25 Jul 2024 14:42:37 +0200 Subject: [PATCH] chg: updated tests/test_web.py in order to retrieve the API_TOKEN provided via environment variable (secrets.API_KEY on GitHub workflow). --- tests/test_web.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_web.py b/tests/test_web.py index 73d8098..c41a3eb 100644 --- a/tests/test_web.py +++ b/tests/test_web.py @@ -2,6 +2,7 @@ import unittest import time +import os from pyvulnerabilitylookup import PyVulnerabilityLookup @@ -9,7 +10,8 @@ class TestPublic(unittest.TestCase): def setUp(self) -> None: - self.client = PyVulnerabilityLookup(root_url="https://vulnerability.circl.lu") + token = os.getenv("API_KEY", "") + self.client = PyVulnerabilityLookup(root_url="https://vulnerability.circl.lu", token=token) # Test default