From ed1c228094188d872ceb8407fb6f46ff698937c2 Mon Sep 17 00:00:00 2001 From: Lorenz Leitner Date: Sun, 10 Oct 2021 15:12:41 +0200 Subject: Add test Put WA api response JSON into test resource file Add short url, increase concurrency Move shorten_url to util dir --- tests/resources/wolfram_alpha_api_response.json | 244 ++++++++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 tests/resources/wolfram_alpha_api_response.json (limited to 'tests') diff --git a/tests/resources/wolfram_alpha_api_response.json b/tests/resources/wolfram_alpha_api_response.json new file mode 100644 index 0000000..c18b30b --- /dev/null +++ b/tests/resources/wolfram_alpha_api_response.json @@ -0,0 +1,244 @@ +{ + "queryresult": { + "success": true, + "error": false, + "numpods": 7, + "datatypes": "Math", + "timedout": "", + "timedoutpods": "", + "timing": 0.934, + "parsetiming": 0.181, + "parsetimedout": false, + "recalculate": "", + "id": "MSP621911bg8chadg539i550000308ea58ih11600i1", + "host": "https://www4c.wolframalpha.com", + "server": "49", + "related": "https://www4c.wolframalpha.com/api/v1/relatedQueries.jsp?id=MSPa622011bg8chadg539i5500004eidb30h8gh28f0f5993178497346123851", + "version": "2.6", + "inputstring": "5/10", + "pods": [ + { + "title": "Input", + "scanner": "Identity", + "id": "Input", + "position": 100, + "error": false, + "numsubpods": 1, + "subpods": [ + { + "title": "", + "img": { + "src": "https://www4c.wolframalpha.com/Calculate/MSP/MSP622111bg8chadg539i5500000he65h3ca6bci37f?MSPStoreType=image/gif&s=49", + "alt": "5/10", + "title": "5/10", + "width": 21, + "height": 37, + "type": "Default", + "themes": "1,2,3,4,5,6,7,8,9,10,11,12", + "colorinvertable": true + }, + "plaintext": "5/10" + } + ], + "expressiontypes": { + "name": "Default" + } + }, + { + "title": "Exact result", + "scanner": "Rational", + "id": "Result", + "position": 200, + "error": false, + "numsubpods": 1, + "primary": true, + "subpods": [ + { + "title": "", + "img": { + "src": "https://www4c.wolframalpha.com/Calculate/MSP/MSP622211bg8chadg539i55000062chh995bc3f9362?MSPStoreType=image/gif&s=49", + "alt": "1/2", + "title": "1/2", + "width": 13, + "height": 37, + "type": "Default", + "themes": "1,2,3,4,5,6,7,8,9,10,11,12", + "colorinvertable": true + }, + "plaintext": "1/2" + } + ], + "expressiontypes": { + "name": "Default" + }, + "states": [ + { + "name": "Step-by-step solution", + "input": "Result__Step-by-step solution", + "stepbystep": true + } + ] + }, + { + "title": "Decimal form", + "scanner": "Numeric", + "id": "DecimalApproximation", + "position": 300, + "error": false, + "numsubpods": 1, + "primary": true, + "subpods": [ + { + "title": "", + "img": { + "src": "https://www4c.wolframalpha.com/Calculate/MSP/MSP622311bg8chadg539i55000069fi57493b7cabb6?MSPStoreType=image/gif&s=49", + "alt": "0.5", + "title": "0.5", + "width": 30, + "height": 21, + "type": "Default", + "themes": "1,2,3,4,5,6,7,8,9,10,11,12", + "colorinvertable": true + }, + "plaintext": "0.5" + } + ], + "expressiontypes": { + "name": "Default" + } + }, + { + "title": "Number line", + "scanner": "NumberLine", + "id": "NumberLine", + "position": 400, + "error": false, + "numsubpods": 1, + "subpods": [ + { + "title": "", + "img": { + "src": "https://www4c.wolframalpha.com/Calculate/MSP/MSP622411bg8chadg539i5500004ddhf07f5g058fcc?MSPStoreType=image/gif&s=49", + "alt": "Number line", + "title": "", + "width": 330, + "height": 59, + "type": "1DMathPlot_1", + "themes": "1,2,3,4,5,6,7,8,9,10,11,12", + "colorinvertable": true + }, + "plaintext": "" + } + ], + "expressiontypes": { + "name": "Default" + } + }, + { + "title": "Percentage", + "scanner": "Numeric", + "id": "Percentage", + "position": 500, + "error": false, + "numsubpods": 1, + "subpods": [ + { + "title": "", + "img": { + "src": "https://www4c.wolframalpha.com/Calculate/MSP/MSP622511bg8chadg539i550000612853id44f7fdg0?MSPStoreType=image/gif&s=49", + "alt": "50%", + "title": "50%", + "width": 28, + "height": 19, + "type": "Default", + "themes": "1,2,3,4,5,6,7,8,9,10,11,12", + "colorinvertable": true + }, + "plaintext": "50%" + } + ], + "expressiontypes": { + "name": "Default" + } + }, + { + "title": "Pie chart", + "scanner": "Rational", + "id": "PieChart", + "position": 600, + "error": false, + "numsubpods": 1, + "subpods": [ + { + "title": "", + "img": { + "src": "https://www4c.wolframalpha.com/Calculate/MSP/MSP622611bg8chadg539i55000021861gdbbi1a4fhb?MSPStoreType=image/gif&s=49", + "alt": "Pie chart", + "title": "", + "width": 60, + "height": 62, + "type": "Default", + "themes": "1,2,3,4,5,6,7,8,9,10,11,12", + "colorinvertable": true + }, + "plaintext": "" + } + ], + "expressiontypes": { + "name": "Default" + } + }, + { + "title": "Continued fraction", + "scanner": "ContinuedFraction", + "id": "ContinuedFraction", + "position": 700, + "error": false, + "numsubpods": 1, + "subpods": [ + { + "title": "", + "img": { + "src": "https://www4c.wolframalpha.com/Calculate/MSP/MSP622711bg8chadg539i550000405cheh4e44a1eb0?MSPStoreType=image/gif&s=49", + "alt": "[0; 2]", + "title": "[0; 2]", + "width": 548, + "height": 19, + "type": "Default", + "themes": "1,2,3,4,5,6,7,8,9,10,11,12", + "colorinvertable": true + }, + "plaintext": "[0; 2]" + } + ], + "expressiontypes": { + "name": "Default" + }, + "states": [ + { + "name": "Fraction form", + "input": "ContinuedFraction__Fraction form" + } + ] + } + ], + "assumptions": { + "type": "Clash", + "word": "5/10", + "template": "Assuming \"${word}\" is ${desc1}. Use as ${desc2} instead", + "count": 2, + "values": [ + { + "name": "FracNumber", + "desc": " referring to math", + "input": "*C.5%2F10-_*FracNumber-" + }, + { + "name": "DateObject", + "desc": "a date", + "input": "*C.5%2F10-_*DateObject-" + } + ] + } + } +} -- cgit v1.2.3 l?id=ee6598d709b2018ea185dc55e9c732f93b69bad4&follow=1'>release 1.0.4Max Audron-1/+1 - add error message if no projects are found - document issue with ssh config being ignored 2023-08-02fix static compile on darwinMax Audron-9/+16 2023-08-02add direnv to gitignoreMax Audron-0/+1 2023-08-02document issue with ignored ssh configMax Audron-0/+14 2023-08-02add error message if no projects foundMax Audron-2/+6 2023-08-02setup new nix flake using craneMax Audron-115/+225 2023-06-22update dependenciesMax Audron-469/+457 2022-07-06release 1.0.1Max Audron-1/+57 - fix gitlab api not returning all results 2022-07-06paginate results from gitlab apiMax Audron-11/+36 2022-06-20add gitlab upload commandMax Audron-0/+4 2022-06-20prepare release 1.0.0Max Audron-3/+17