Skip to content

Commit

Permalink
fix: wait for pysec to be done.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Jan 18, 2024
1 parent f505200 commit 0281341
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_web.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import unittest
import time

from pyvulnerabilitylookup import PyVulnerabilityLookup

Expand All @@ -15,5 +16,9 @@ def test_up(self) -> None:
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)

0 comments on commit 0281341

Please sign in to comment.