fixed test
switched to proper multiprocessing
This commit is contained in:
@@ -44,18 +44,18 @@ class TestDaemon:
|
|||||||
cls.s.close()
|
cls.s.close()
|
||||||
|
|
||||||
def test_discover(self):
|
def test_discover(self):
|
||||||
ref = uuid.uuid4()
|
ref = uuid.uuid4().urn[9:]
|
||||||
sjson = {
|
sjson = {
|
||||||
"action": "discover",
|
"action": "discover",
|
||||||
"ref": ref.urn[9:]
|
"ref": ref
|
||||||
}
|
}
|
||||||
|
|
||||||
self.s.send(json.dumps(sjson).encode())
|
self.s.send(json.dumps(sjson).encode())
|
||||||
|
|
||||||
rstr = self.s.recv(1024)
|
rstr = self.s.recv(1024).decode()
|
||||||
|
|
||||||
assert rstr is not None
|
assert rstr is not None
|
||||||
|
|
||||||
rjson = json.loads(self.s.recv(5120))
|
rjson = json.loads(rstr)
|
||||||
assert rjson['ref'] == ref
|
assert rjson['ref'] == ref
|
||||||
assert rjson['version'] is not None
|
assert rjson['version'] is not None
|
||||||
|
Reference in New Issue
Block a user