Updated testing

This commit is contained in:
Krateng 2021-01-10 17:00:16 +01:00
parent 6efe4a48c7
commit a42ed56d2d
2 changed files with 54 additions and 21 deletions

View File

@ -5,7 +5,7 @@ author = {
"email":"maloja@krateng.dev", "email":"maloja@krateng.dev",
"github": "krateng" "github": "krateng"
} }
version = 2,12,0 version = 2,12,1
versionstr = ".".join(str(n) for n in version) versionstr = ".".join(str(n) for n in version)
links = { links = {
"pypi":"malojaserver", "pypi":"malojaserver",
@ -16,7 +16,7 @@ requires = [
"bottle>=0.12.16", "bottle>=0.12.16",
"waitress>=1.3", "waitress>=1.3",
"doreah>=1.6.12", "doreah>=1.6.12",
"nimrodel>=0.6.4", "nimrodel>=0.6.5",
"setproctitle>=1.1.10", "setproctitle>=1.1.10",
"wand>=0.5.4", "wand>=0.5.4",
"lesscpy>=0.13", "lesscpy>=0.13",

View File

@ -1,6 +1,6 @@
{ {
"info": { "info": {
"_postman_id": "98472441-3ca2-4aba-9148-81f8d1a61b16", "_postman_id": "632b8649-8470-43d3-934d-8c89dc90464c",
"name": "Maloja", "name": "Maloja",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
}, },
@ -18,7 +18,7 @@
"formdata": [] "formdata": []
}, },
"url": { "url": {
"raw": "{{url}}/apis/mlj_1/newscrobble?key={{api_key}}&artist={{example_artist}}&title={{example_song}}", "raw": "{{url}}/apis/mlj_1/newscrobble?key={{api_key}}&artist={{example_artist}}&title={{example_song}}&artist={{example_artist_2}}",
"host": [ "host": [
"{{url}}" "{{url}}"
], ],
@ -39,6 +39,10 @@
{ {
"key": "title", "key": "title",
"value": "{{example_song}}" "value": "{{example_song}}"
},
{
"key": "artist",
"value": "{{example_artist_2}}"
} }
] ]
} }
@ -51,7 +55,7 @@
"method": "POST", "method": "POST",
"header": [], "header": [],
"url": { "url": {
"raw": "{{url}}/api/newscrobble?key={{api_key}}&artist={{example_artist}}&title={{example_song}}", "raw": "{{url}}/api/newscrobble?key={{api_key}}&artist={{example_artist}}&title={{example_song}}&artist={{example_artist_2}}",
"host": [ "host": [
"{{url}}" "{{url}}"
], ],
@ -71,6 +75,10 @@
{ {
"key": "title", "key": "title",
"value": "{{example_song}}" "value": "{{example_song}}"
},
{
"key": "artist",
"value": "{{example_artist_2}}"
} }
] ]
} }
@ -99,6 +107,11 @@
"key": "title", "key": "title",
"value": "{{example_song}}", "value": "{{example_song}}",
"type": "text" "type": "text"
},
{
"key": "artist",
"value": "{{example_artist_2}}",
"type": "text"
} }
] ]
}, },
@ -138,6 +151,11 @@
"key": "title", "key": "title",
"value": "{{example_song}}", "value": "{{example_song}}",
"type": "text" "type": "text"
},
{
"key": "artist",
"value": "{{example_artist_2}}",
"type": "text"
} }
] ]
}, },
@ -184,6 +202,36 @@
}, },
"response": [] "response": []
}, },
{
"name": "JSON Multiartist",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"key\": \"{{api_key}}\",\n \"artists\": [\"{{example_artist}}\",\"{{example_artist_2}}\"],\n \"title\": \"{{example_song}}\"\n}"
},
"url": {
"raw": "{{url}}/apis/mlj_1/newscrobble",
"host": [
"{{url}}"
],
"path": [
"apis",
"mlj_1",
"newscrobble"
]
}
},
"response": []
},
{ {
"name": "JSON Redirect", "name": "JSON Redirect",
"request": { "request": {
@ -302,7 +350,6 @@
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "60551e90-aea5-4489-aded-a93c6d2ae055",
"exec": [ "exec": [
"" ""
], ],
@ -312,7 +359,6 @@
{ {
"listen": "prerequest", "listen": "prerequest",
"script": { "script": {
"id": "9928c378-cf37-4e20-b653-51f5dde51192",
"exec": [ "exec": [
"" ""
], ],
@ -355,7 +401,6 @@
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "60551e90-aea5-4489-aded-a93c6d2ae055",
"exec": [ "exec": [
"" ""
], ],
@ -399,7 +444,6 @@
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "addc7f42-1de5-4b6d-a840-bb3075bd2cdc",
"exec": [ "exec": [
"var data = JSON.parse(responseBody);", "var data = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"session_key\", data.session.key);", "postman.setEnvironmentVariable(\"session_key\", data.session.key);",
@ -450,7 +494,6 @@
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "01f6143f-3134-4006-9792-6e61a2be323d",
"exec": [ "exec": [
"var data = responseBody.split(\"\\n\");", "var data = responseBody.split(\"\\n\");",
"postman.setEnvironmentVariable(\"session_key\", data[1]);", "postman.setEnvironmentVariable(\"session_key\", data[1]);",
@ -462,7 +505,6 @@
{ {
"listen": "prerequest", "listen": "prerequest",
"script": { "script": {
"id": "b97afa75-ab8c-4099-a6cf-6b45d653a10d",
"exec": [ "exec": [
"apikey = pm.variables.get(\"api_key\");", "apikey = pm.variables.get(\"api_key\");",
"ts = pm.variables.get(\"timestamp\");", "ts = pm.variables.get(\"timestamp\");",
@ -556,15 +598,13 @@
}, },
"response": [] "response": []
} }
], ]
"protocolProfileBehavior": {}
} }
], ],
"event": [ "event": [
{ {
"listen": "prerequest", "listen": "prerequest",
"script": { "script": {
"id": "6659b674-ce6f-48b5-bb64-880356ce6739",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"var current_timestamp = Math.floor(Date.now() / 1000);", "var current_timestamp = Math.floor(Date.now() / 1000);",
@ -576,7 +616,6 @@
{ {
"listen": "test", "listen": "test",
"script": { "script": {
"id": "09c3ea43-30e4-4e83-b32f-dd06c1884bab",
"type": "text/javascript", "type": "text/javascript",
"exec": [ "exec": [
"" ""
@ -586,32 +625,26 @@
], ],
"variable": [ "variable": [
{ {
"id": "88c0d6ae-fb1a-420d-aa65-494f561090ff",
"key": "url", "key": "url",
"value": "http://localhost:42010" "value": "http://localhost:42010"
}, },
{ {
"id": "4cd70ff6-d2d8-4ff9-bb51-ee0ac46a0c7a",
"key": "api_key", "key": "api_key",
"value": "localdevtestkey" "value": "localdevtestkey"
}, },
{ {
"id": "bb5a3d1f-34a7-421d-a60a-eaa6dd3cac61",
"key": "example_artist", "key": "example_artist",
"value": "EXID ft. Jeremy Soule" "value": "EXID ft. Jeremy Soule"
}, },
{ {
"id": "6a344668-55f0-44de-ae9b-bb7df916f5fd",
"key": "example_song", "key": "example_song",
"value": "Why is the Rum gone?" "value": "Why is the Rum gone?"
}, },
{ {
"id": "17fc8bb2-4fc3-461c-8581-48573f640f7c",
"key": "example_artist_2", "key": "example_artist_2",
"value": "BLACKPINK ft. Tzuyu" "value": "BLACKPINK ft. Tzuyu"
}, },
{ {
"id": "b87d84f6-3f3a-4732-becf-b34794a1c178",
"key": "example_song_2", "key": "example_song_2",
"value": "POP/STARS" "value": "POP/STARS"
} }