mirror of
https://github.com/cve-search/PyVulnerabilityLookup.git
synced 2024-11-25 16:27:23 +00:00
fix: wait for pysec to be done.
This commit is contained in:
parent
f50520033b
commit
0281341a3b
1 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import unittest
|
||||
import time
|
||||
|
||||
from pyvulnerabilitylookup import PyVulnerabilityLookup
|
||||
|
||||
|
@ -15,5 +16,9 @@ class TestBasic(unittest.TestCase):
|
|||
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')
|
||||
while True:
|
||||
if vuln := self.client.get_vulnerability('PYSEC-2024-4'):
|
||||
self.assertEqual(vuln['id'], 'PYSEC-2024-4')
|
||||
break
|
||||
print('waiting for pysec to be imported')
|
||||
time.sleep(1)
|
||||
|
|
Loading…
Reference in a new issue