pyresttest
pyresttest copied to clipboard
Invalid configuration for content while running below code
I didn't figure out the issue could someone please help me out
- config:
- testset: "Api tests"
- variable_binds: {user_id: "ravitej", pass: "123456"}
- test: #Project_Admin: User Login success
- name: "Project_Admin: User login success"
- url: "/user/login"
- method: "POST"
- body: {template: {"username": "$user_id", "password": "$pass", "authtype": "plain"}}
- headers: {Content-Type: application/json}
- expected_status: [200]
- group: "Login_User"
output:
Traceback (most recent call last):
File "/usr/local/bin/pyresttest", line 5, in
I have it like this: - variable_binds: { 'cache': 'Cache-Control', 'cachevalue': 'no-cache', 'content_type': 'Content-Type', 'content_type_value': 'application/json', }
- headers: {template: {'$content_type': '$content_type_value', '$cache': '$cachevalue'}}
don't know is it matters or not, but my variables are inside 'value'