mirror of
https://github.com/cve-search/PyVulnerabilityLookup.git
synced 2024-11-25 16:27:23 +00:00
20 lines
539 B
Python
20 lines
539 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import unittest
|
|
|
|
from pyvulnerabilitylookup import PyVulnerabilityLookup
|
|
|
|
|
|
class TestBasic(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
self.client = PyVulnerabilityLookup(root_url="http://127.0.0.1:10001")
|
|
|
|
def test_up(self):
|
|
self.assertTrue(self.client.is_up)
|
|
self.assertTrue(self.client.redis_up())
|
|
|
|
def test_get_vulnerability(self):
|
|
vuln = self.client.get_vulnerability('CVE-2023-23059')
|
|
self.assertEqual(vuln['cve']['id'], 'CVE-2023-23059')
|