需要在 .yaml 文件中带上实际日期
Need bring actual date in .yalm file
我正在使用 "tavern" 测试 Django API rest。我在这个库中很新,我不知道我的问题是否可行,但需要第二个日期属性 header,带上当前日期而不是 hard-code。
可以吗?
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 }
可能的解决方案是在顶部写下以下行
strict: False
这将允许您评估或不评估哪个属性
我正在使用 "tavern" 测试 Django API rest。我在这个库中很新,我不知道我的问题是否可行,但需要第二个日期属性 header,带上当前日期而不是 hard-code。
可以吗?
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 }
可能的解决方案是在顶部写下以下行
strict: False
这将允许您评估或不评估哪个属性