*** Settings ***
Resource          flow_zmx.resource
Resource          res_zmx.resource

*** Variables ***
${path}           /api/chat/history

*** Test Cases ***
正例-正常删除会话
    [Tags]    F
    create session    URI    ${URL}
    ${content}    DEL请求结果_params    ${path}    {"sessionId":"${sessionId}"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200

反例-传入错误token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    DEL请求结果_params    ${path}    {"sessionId":"${sessionId}"}    401    {}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-传入空白token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    DEL请求结果_params    ${path}    {"sessionId":"${sessionId}"}    401    ${EMPTY}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-不传code
    [Tags]    E
    create session    URI    ${URL}
    ${content}    DEL请求结果_params    ${path}    {}    422    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["detail"][0]["msg"]}    Field required
