diff options
author | 2017-07-27 09:02:54 +0300 | |
---|---|---|
committer | 2017-07-27 14:56:25 +0300 | |
commit | 7e83d0876ddb84a45e130eeba28bc40ef53c074b (patch) | |
tree | 47d76239ae7658d87c66abd142df92709427e7dd /app/test/api/responders_test/test_data/messages.py | |
parent | 378ecbd8947589b9cbb39013a0c2e2aa201e03bd (diff) |
Calipso initial release for OPNFV
Change-Id: I7210c244b0c10fa80bfa8c77cb86c9d6ddf8bc88
Signed-off-by: Yaron Yogev <yaronyogev@gmail.com>
Diffstat (limited to 'app/test/api/responders_test/test_data/messages.py')
-rw-r--r-- | app/test/api/responders_test/test_data/messages.py | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/app/test/api/responders_test/test_data/messages.py b/app/test/api/responders_test/test_data/messages.py new file mode 100644 index 0000000..b7b5abd --- /dev/null +++ b/app/test/api/responders_test/test_data/messages.py @@ -0,0 +1,108 @@ +############################################################################### +# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) # +# and others # +# # +# All rights reserved. This program and the accompanying materials # +# are made available under the terms of the Apache License, Version 2.0 # +# which accompanies this distribution, and is available at # +# http://www.apache.org/licenses/LICENSE-2.0 # +############################################################################### +from test.api.responders_test.test_data import base + +# url +URL = "/messages" + +NONEXISTENT_MESSAGE_ID = "80b5e074-0f1a-4b67-810c-fa9c92d41a9f" +MESSAGE_ID = "80b5e074-0f1a-4b67-810c-fa9c92d41a98" + +WRONG_SEVERITY = base.WRONG_MESSAGE_SEVERITY +CORRECT_SEVERITY = base.CORRECT_MESSAGE_SEVERITY + +WRONG_RELATED_OBJECT_TYPE = base.WRONG_OBJECT_TYPE +CORRECT_RELATED_OBJECT_TYPE = base.CORRECT_OBJECT_TYPE + +RELATED_OBJECT = "instance" +NONEXISTENT_RELATED_OBJECT = "nonexistent-instance" + +WRONG_FORMAT_TIME = base.WRONG_FORMAT_TIME +CORRECT_FORMAT_TIME = base.CORRECT_FORMAT_TIME + +MESSAGES_WITH_SPECIFIC_TIME = [ + { + "level": "info", + "environment": "Mirantis-Liberty-API", + "id": "3c64fe31-ca3b-49a3-b5d3-c485d7a452e7", + "source_system": "OpenStack", + "timestamp": CORRECT_FORMAT_TIME + } +] + +MESSAGES_WITH_SPECIFIC_TIME_RESPONSE = { + "messages": MESSAGES_WITH_SPECIFIC_TIME +} + +MESSAGES_WITH_SPECIFIC_SEVERITY = [ + { + "level": CORRECT_SEVERITY, + "environment": "Mirantis-Liberty-API", + "id": "3c64fe31-ca3b-49a3-b5d3-c485d7a452e7", + "source_system": "OpenStack" + }, + { + "level": CORRECT_SEVERITY, + "environment": "Mirantis-Liberty-API", + "id": "c7071ec0-04db-4820-92ff-3ed2b916738f", + "source_system": "OpenStack" + }, +] + +MESSAGES_WITH_SPECIFIC_SEVERITY_RESPONSE = { + "messages": MESSAGES_WITH_SPECIFIC_SEVERITY +} + +MESSAGES_WITH_SPECIFIC_RELATED_OBJECT_TYPE = [ + { + "level": "info", + "environment": "Mirantis-Liberty-API", + "related_object_type": CORRECT_RELATED_OBJECT_TYPE, + "id": "3c64fe31-ca3b-49a3-b5d3-c485d7a452e7" + }, + { + "level": "error", + "environment": "Mirantis-Liberty-API", + "related_object_type": CORRECT_RELATED_OBJECT_TYPE, + "id": "c7071ec0-04db-4820-92ff-3ed2b916738f" + }, +] + +MESSAGES_WITH_SPECIFIC_RELATED_OBJECT_TYPE_RESPONSE = { + "messages": MESSAGES_WITH_SPECIFIC_RELATED_OBJECT_TYPE +} + +MESSAGES_WITH_SPECIFIC_ID = [ + { + "level": "info", + "environment": "Mirantis-Liberty", + "id": MESSAGE_ID, + "source_system": "OpenStack" + } +] + +MESSAGES = [ + { + "level": "info", + "environment": "Mirantis-Liberty", + "id": "3c64fe31-ca3b-49a3-b5d3-c485d7a452e7", + "source_system": "OpenStack" + }, + { + "level": "info", + "environment": "Mirantis-Liberty", + "id": "c7071ec0-04db-4820-92ff-3ed2b916738f", + "source_system": "OpenStack" + }, +] + +MESSAGES_RESPONSE = { + "messages": MESSAGES +} |