diff options
Diffstat (limited to 'test_api')
-rw-r--r-- | test_api/test_api.py | 8 | ||||
-rw-r--r-- | test_api/test_api_get_long.barb | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test_api/test_api.py b/test_api/test_api.py index bd8303d..cce55f4 100644 --- a/test_api/test_api.py +++ b/test_api/test_api.py @@ -4,6 +4,14 @@ from bottle import get, post, run, HTTPError def get_root(): return {"status": "OK"} +@get("/long") +def get_long(): + return {"data": [ + {"name": "apple", "calories": 5}, + {"name": "orange", "calories": 120}, + {"name": "pear", "calories": 45}, + ]} + @post("/") def post_root(): return {"status": "SUCCESS"} diff --git a/test_api/test_api_get_long.barb b/test_api/test_api_get_long.barb new file mode 100644 index 0000000..96133b3 --- /dev/null +++ b/test_api/test_api_get_long.barb @@ -0,0 +1,2 @@ +#GET^http://localhost:8080/long +#Foo: Bar |