simple_test_tools
simple_test_tools copied to clipboard
python script to build simple test tools
使用python实现简单的测试工具
API
simple_server
- GET /ping
- GET /user
jwt_server
# login
http -v --json POST localhost:8000/login username=admin password=admin
# refresh token
http -v -f GET localhost:8000/auth/refresh_token "Authorization:Bearer xxxxxxxxx" "Content-Type: application/json"
# login success
http -f GET localhost:8000/auth/hello "Authorization:Bearer xxxxxxxxx" "Content-Type: application/json"
# login success but authorization failed
http -f GET localhost:8000/auth/hello "Authorization:Bearer xxxxxxxxx" "Content-Type: application/json"