From 5004dbb51b4ef5eaf92b88fe4aa1805c296de6f6 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Tue, 28 Feb 2023 10:23:54 +0100 Subject: [PATCH] Updated /added Postman tests --- ...SCore-Python tests.postman_collection.json | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/endpoint_tests/VIPSCore-Python tests.postman_collection.json b/endpoint_tests/VIPSCore-Python tests.postman_collection.json index 8ce425b..298d9dd 100644 --- a/endpoint_tests/VIPSCore-Python tests.postman_collection.json +++ b/endpoint_tests/VIPSCore-Python tests.postman_collection.json @@ -89,6 +89,42 @@ }, "response": [] }, + { + "name": "List all models (plain text)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "pm.test(\"Text is returned\", function () {", + " var textData = pm.response.text()", + " pm.expect(textData.indexOf(\"reference\") >=0);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{vipscore_python_url}}/models/", + "host": [ + "{{vipscore_python_url}}" + ], + "path": [ + "models", + "" + ] + }, + "description": "Test one of the stockpile models of VIPS" + }, + "response": [] + }, { "name": "Get REFERENCEM warning status interpretation", "event": [ @@ -112,14 +148,14 @@ "method": "GET", "header": [], "url": { - "raw": "{{vipscore_python_url}}/models/REFERENCEM/description", + "raw": "{{vipscore_python_url}}/models/REFERENCEM/warningstatusinterpretation", "host": [ "{{vipscore_python_url}}" ], "path": [ "models", "REFERENCEM", - "description" + "warningstatusinterpretation" ] }, "description": "Test one of the stockpile models of VIPS" -- GitLab