From 218522b08c02af8290f14724a9220ea46c3b1cf1 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 12 Jan 2024 16:14:01 +1100 Subject: [PATCH] Fix issues when generating docs --- docs/api/notifications/node.deleted.json | 3 +++ docs/api/notifications/node.updated.json | 3 +++ docs/curl.rst | 2 +- docs/project_notifications.rst | 2 +- tests/handlers/api/controller/test_project.py | 4 +++- 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 docs/api/notifications/node.deleted.json create mode 100644 docs/api/notifications/node.updated.json diff --git a/docs/api/notifications/node.deleted.json b/docs/api/notifications/node.deleted.json new file mode 100644 index 00000000..e24038fa --- /dev/null +++ b/docs/api/notifications/node.deleted.json @@ -0,0 +1,3 @@ +{ + "a": "b" +} \ No newline at end of file diff --git a/docs/api/notifications/node.updated.json b/docs/api/notifications/node.updated.json new file mode 100644 index 00000000..e24038fa --- /dev/null +++ b/docs/api/notifications/node.updated.json @@ -0,0 +1,3 @@ +{ + "a": "b" +} \ No newline at end of file diff --git a/docs/curl.rst b/docs/curl.rst index 20a4c85a..3188ce86 100644 --- a/docs/curl.rst +++ b/docs/curl.rst @@ -576,7 +576,7 @@ Read :doc:`project_notifications` for more information. Where to find the endpoints? -########################### +############################ A list of all endpoints is available: :doc:`endpoints` diff --git a/docs/project_notifications.rst b/docs/project_notifications.rst index 58ab1861..3eba55a8 100644 --- a/docs/project_notifications.rst +++ b/docs/project_notifications.rst @@ -105,7 +105,7 @@ snapshot.restored A snapshot has been restored -.. literalinclude:: api/notifications/project.snapshot_restored.json +.. literalinclude:: api/notifications/snapshot.restored.json log.error --------- diff --git a/tests/handlers/api/controller/test_project.py b/tests/handlers/api/controller/test_project.py index ed8aeb22..74f24759 100644 --- a/tests/handlers/api/controller/test_project.py +++ b/tests/handlers/api/controller/test_project.py @@ -186,7 +186,9 @@ async def test_notification(controller_api, http_client, project, controller): assert b'"cpu_usage_percent"' in response.body assert b'{"action": "node.created", "event": {"a": "b"}}\n' in response.body assert project.status == "opened" - + controller.notification.project_emit("node.updated", {"a": "b"}) + controller.notification.project_emit("node.deleted", {"a": "b"}) + controller.notification.project_emit("snapshot.restored", {"a": "b"}) async def test_notification_invalid_id(controller_api):