Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #54 from jjnicola/fix-unittest
Browse files Browse the repository at this point in the history
Improve unittest.
  • Loading branch information
janowagner authored Oct 11, 2018
2 parents eae6a74 + 394451e commit 49c231c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/testScanAndResult.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,16 @@ def testGetScanPop(self):
self.assertEqual(response.findtext('scan/results/result'),
None)

time.sleep(1)
while True:
response = secET.fromstring(
daemon.handle_command(
'<get_scans scan_id="%s" details="0"/>' % scan_id))
scans = response.findall('scan')
self.assertEqual(1, len(scans))
scan = scans[0]
if int(scan.get('progress')) == 100:
break

response = secET.fromstring(
daemon.handle_command('<delete_scan scan_id="%s" />' % scan_id))
self.assertEqual(response.get('status'), '200')
Expand Down

0 comments on commit 49c231c

Please sign in to comment.