diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-05-30 23:40:39 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-05-30 23:40:39 (GMT) |
commit | 1865cce4d51b9c7a6fb718f4e2c034a57365ad1b (patch) | |
tree | c82b56f65504596c1ab3e3ef426cca55bca40a62 /tests/analysis | |
parent | 3a9cf58a75c87b9046c1646a97b798508619fd62 (diff) |
Create a command to list remote binaries.
Diffstat (limited to 'tests/analysis')
-rw-r--r-- | tests/analysis/db/conn.py | 20 |
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) |