I'm using "tavern" for testing a Django API rest. I pretty new in this library and I don't know if my question is posible but need the date atribute in second header, bring a current date and not hard-code one.
Is it possible?
stages:
- name: login
request:
url: http//......
json:
email: email
password: pass
method: POST
headers:
content-type: application/json
response:
status_code: 200
body:
{
"refresh": refresh token
"access": access token
"id": 1,
"username": username,
"email": email,
"first_name": name,
"last_name": last,
"group": group,
"manager": null,
"profile_photo": photo
}
headers:
content-type: application/json
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
x-frame-options: SAMEORIGIN
connection: close
server: Werkzeug/0.12.2 Python/3.6.2
date: { here is the field }
Aucun commentaire:
Enregistrer un commentaire