#!/usr/bin/env python3 import unittest from pyvulnerabilitylookup import PyVulnerabilityLookup class TestBasic(unittest.TestCase): def setUp(self) -> None: self.client = PyVulnerabilityLookup(root_url="http://127.0.0.1:10001") def test_up(self) -> None: self.assertTrue(self.client.is_up) self.assertTrue(self.client.redis_up()) def test_get_vulnerability(self) -> None: vuln = self.client.get_vulnerability('PYSEC-2024-4') self.assertEqual(vuln['id'], 'PYSEC-2024-4')