[
{
"name": "Task 1",
"request": {
"url": "http://toster.ru/api/v1/questions/id231",
"method": "get",
"params": [
"select": ["one", "two"],
"public": "true"
],
"headers": []
},
"response": {
"body": {
"title": "Существует модуль для тестирования REST API на Python 3?",
"content": "Ищу модуль/фреймворк для тестирование REST API на Python 3. Хочу иметь..."
},
"headers": [
"Content-Type": "application/json"
]
}
}
]
#!/bin/bash
test_api()
{
wget -O"1111" "$1"
sleep 2
cat 1111
read
}
set +ue
set -x
TEST_DEVICE=0
TEST_DEVICE_ACCEPT=1
TEST_APP=0
if [ $TEST_DEVICE == 1 ]
then
test_api http://127.0.0.1:5012/api/v1/device/json?id=123123123213
exit
test_api http://127.0.0.1:5012/api/v1/device/json?id=123123123
test_api http://127.0.0.1:5012/api/v1/device/json?id=12facacac3
test_api "http://127.0.0.1:5012/api/v1/device/json?id=12facacac3&name=test device"
test_api "http://127.0.0.1:5012/api/v1/device/json?id=12facacac3&name=test device111122223333444455556666777788889999000011112222333344
test_api "http://127.0.0.1:5012/api/v1/device/json?id=22a0000015b8cc3c&name=test device111122223333444455556666777788889999000011112222
test_api "http://127.0.0.1:5012/api/v1/device/json?id=ffffffffffffffff&name=test device111122223333444455556666777788889999000011112222
fi