mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
The controller has a streaming API
Now we need to link the hypervisor to the controller.
This commit is contained in:
9 files changed
+255
-53
No files matched your search
@@ -99,3 +99,15 @@ def test_getLink(async_run):
|
||||
|
||||
with pytest.raises(aiohttp.web_exceptions.HTTPNotFound):
|
||||
project.getLink("test")
|
||||
|
||||
|
||||
def test_emit(async_run):
|
||||
project = Project()
|
||||
with project.queue() as queue:
|
||||
assert len(project._listeners) == 1
|
||||
async_run(queue.get(0.1)) # ping
|
||||
project.emit('test', {})
|
||||
notif = async_run(queue.get(5))
|
||||
assert notif == ('test', {}, {})
|
||||
|
||||
assert len(project._listeners) == 0
|
||||
Reference in new issue
Block a user