config:
    name: "create user and check result."
    id: create_and_check
    base_url: "http://127.0.0.1:5000"
    variables:
        uid: 9001
        device_sn: "TESTCASE_CREATE_XXX"

teststeps:
-
    name: make sure user $uid does not exist
    api: api/get_user.yml
    variables:
        uid: $uid
        token: $token
    validate:
        - eq: ["status_code", 404]
        - eq: ["content.success", false]

-
    name: create user $uid for $device_sn
    api: api/create_user.yml
    variables:
        user_name: "user1"
        user_password: "123456"
        uid: $uid
        token: $token
    validate:
        - eq: ["status_code", 201]
        - eq: ["content.success", true]

-
    name: check if user $uid exists
    api: api/get_user.yml
    variables:
        uid: $uid
        token: $token
    validate:
        - eq: ["status_code", 200]
        - eq: ["content.success", true]
