Add project.created, project.opened and project.deleted controller notification stream.

Move project.updated and project.closed from project notification to controller notification stream.
This commit is contained in:
grossmj committed 2024-01-28 12:13:09 +11:00
1 parent d466c85385
commit e3493870b2
4 files changed
+103 -73

No files matched your search

+3 -1
View File
@@ -213,7 +213,9 @@ async def test_compute_httpQuery_project(compute):
response = MagicMock()
with asyncio_patch("aiohttp.ClientSession.request", return_value=response) as mock:
response.status = 200
project = Project(name="Test")
with patch('gns3server.controller.project.Project.emit_controller_notification') as mock_notification:
project = Project(name="Test")
mock_notification.assert_called()
await compute.post("/projects", project)
mock.assert_called_with("POST", "https://example.com:84/v2/compute/projects", data=json.dumps(project.__json__()), headers={'content-type': 'application/json'}, auth=None, chunked=None, timeout=20)
await compute.close()