如果id有效,如何使用unittest检查?
我发送了put请求 http://localhost:8080/xxx/xx/xxx/xxx/xxxx/9991。 9991-这是{Id}
{
"endCustomerId": "9991",
"name": "John",
"lastName": "Smith",
"dateOfBirth": "1978-02-02",
"nationality": "GB"
}
我想防止以下情况 http://localhost:8080/xxx/xx/xxx/xxx/xxxx/9991
{
"endCustomerId": "**12431**",
"name": "John",
"lastName": "Smith",
"dateOfBirth": "1978-02-02",
"nationality": "PL"
}