Skip to content

Commit 0281341

Browse files
committed
fix: wait for pysec to be done.
1 parent f505200 commit 0281341

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_web.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22

33
import unittest
4+
import time
45

56
from pyvulnerabilitylookup import PyVulnerabilityLookup
67

@@ -15,5 +16,9 @@ def test_up(self) -> None:
1516
self.assertTrue(self.client.redis_up())
1617

1718
def test_get_vulnerability(self) -> None:
18-
vuln = self.client.get_vulnerability('PYSEC-2024-4')
19-
self.assertEqual(vuln['id'], 'PYSEC-2024-4')
19+
while True:
20+
if vuln := self.client.get_vulnerability('PYSEC-2024-4'):
21+
self.assertEqual(vuln['id'], 'PYSEC-2024-4')
22+
break
23+
print('waiting for pysec to be imported')
24+
time.sleep(1)

0 commit comments

Comments
 (0)