summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/analysis/db/conn.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/analysis/db/conn.py b/tests/analysis/db/conn.py
index 39c660a..f388f60 100644
--- a/tests/analysis/db/conn.py
+++ b/tests/analysis/db/conn.py
@@ -6,6 +6,7 @@ from pychrysalide.analysis.db import HubServer
import os
import shutil
import tempfile
+import threading
class TestDbConnection(ChrysalideTestCase):
@@ -113,13 +114,24 @@ class TestDbConnection(ChrysalideTestCase):
#print(ret)
- admin = AdminClient()
- #print(admin)
+ admin = AdminClient()
+
ret = admin.start('localhost', '9999')
+ self.assertTrue(ret)
- #print('FINAL::', ret)
+ def _on_existing_binaries_updated(adm, evt):
+ evt.set()
- #print(server)
+ event = threading.Event()
+
+ admin.connect('existing-binaries-updated', _on_existing_binaries_updated, event)
+
+ ret = admin.request_existing_binaries()
+ self.assertTrue(ret)
+
+ event.wait()
+
+ self.assertEqual(len(admin.existing_binaries), 0)