Pass rate: 71.4%
7
Total
5
Passed
2
Failed
0
Errors
0
Skipped
| Status | Test ID | Duration | Calls | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PASSED | ▶ tests/users/test_users.py::TestUsers::test_create_user_flow user | 0.842s | 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
POST
https://gorest.in/public/v2/users
201
775.1 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Neil Brandt",
"email": "neil.brandt.6c465194@yahoo.com",
"gender": "male",
"status": "active"
}
{
"id": 1021,
"name": "Neil Brandt",
"email": "neil.brandt.6c465194@yahoo.com",
"gender": "male",
"status": "active"
}
DELETE
https://gorest.in/public/v2/users/1021
204
57.8 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
— ASSERTIONS
✅
status_is
expected=201
actual=201
✅
has_key
key=id
✅
key_equals
key=name
expected=Neil Brandt
actual=Neil Brandt
✅
key_equals
key=email
expected=neil.brandt.6c465194@yahoo.com
actual=neil.brandt.6c465194@yahoo.com
✅
equals
path=$.status
expected=active
actual=active
✅
key_equals
key=gender
expected=male
actual=male
LOGS
--- Captured log setup ---
DEBUG pytest_api_core.config:config_manager.py:103 Loaded config for env='dev': {'base_url': 'https://gorest.in', 'timeout': 30, 'verify_ssl': True, 'headers': {'Accept': 'application/json', 'Content-Type': 'application/json'}, 'api_retry_total': 3, 'api_retry_backoff_factor': 0.3, 'api_retry_methods': ['GET', 'HEAD', 'OPTIONS']}
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Neil Brandt', 'email': 'neil.brandt.6c465194@yahoo.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): gorest.in:443
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 201 107
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 201 (775.1 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1021,
"name": "Neil Brandt",
"email": "neil.brandt.6c465194@yahoo.com",
"gender": "male",
"status": "active"
}
--- Captured log teardown ---
DEBUG pytest_api_core.client:api_client.py:147 → DELETE https://gorest.in/public/v2/users/1021 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "DELETE /public/v2/users/1021 HTTP/1.1" 204 0
INFO pytest_api_core.client:api_client.py:162 ← DELETE https://gorest.in/public/v2/users/1021 204 (57.8 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PASSED | ▶ tests/users/test_users.py::TestUsers::test_create_user_blocked_token user | 0.188s | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
POST
https://gorest.in/public/v2/users
403
185.4 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Zachary Deleon",
"email": "zachary.deleon.95a55b2c@yahoo.com",
"gender": "male",
"status": "active"
}
{
"message": "Forbidden. This token does not have permission to access this endpoint."
}
ASSERTIONS
✅
status_is
expected=403
actual=403
✅
has_key
key=message
✅
equals
path=$.message
expected=Forbidden. This token does not have permission to access this endpoint.
actual=Forbidden. This token does not have permission to access this endpoint.
LOGS
--- Captured log call ---
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Zachary Deleon', 'email': 'zachary.deleon.95a55b2c@yahoo.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): gorest.in:443
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 403 85
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 403 (185.4 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"message": "Forbidden. This token does not have permission to access this endpoint."
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FAILED | ▶ tests/users/test_users.py::TestUsers::test_create_user_duplicate_email user | 0.692s | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
POST
https://gorest.in/public/v2/users
201
573.1 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
{
"id": 1021,
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
POST
https://gorest.in/public/v2/users
201
55.1 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
{
"id": 1022,
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
DELETE
https://gorest.in/public/v2/users/1021
404
59.5 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
{
"message": "Resource not found"
}
ASSERTIONS
❌
status_is
expected=422
actual=201
LOGS
--- Captured log setup ---
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Terry Odonnell', 'email': 'terry.odonnell.5e303a23@hotmail.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 201 115
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 201 (573.1 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1021,
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
--- Captured log call ---
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Terry Odonnell', 'email': 'terry.odonnell.5e303a23@hotmail.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 201 115
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 201 (55.1 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1022,
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
--- Captured log teardown ---
DEBUG pytest_api_core.client:api_client.py:147 → DELETE https://gorest.in/public/v2/users/1021 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "DELETE /public/v2/users/1021 HTTP/1.1" 404 32
INFO pytest_api_core.client:api_client.py:162 ← DELETE https://gorest.in/public/v2/users/1021 404 (59.5 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"message": "Resource not found"
}
FAILURE
self = <tests.users.test_users.TestUsers object at 0x7fc360aff710>
api_client = <APIClient base_url='https://gorest.in'>
new_user_payload = {'name': 'Terry Odonnell', 'email': 'terry.odonnell.5e303a23@hotmail.com', 'gender': 'male', 'status': 'active'}
created_user = <APIResponse [201] https://gorest.in/public/v2/users (573.1 ms)>
def test_create_user_duplicate_email(self, api_client, new_user_payload, created_user):
response = api_client.post(USERS_PATH, json=new_user_payload)
assert_that(response) \
> .status_is(422) \
^^^^^^^^^^^^^^
.json_path("$[0].field").equals("email") \
.json_path("$[0].message").equals("has already been taken")
tests/users/test_users.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_api_core.assertions.response_assertions.ResponseAssertions object at 0x7fc360b1aed0>
expected = 422
def status_is(self, expected: int) -> "ResponseAssertions":
"""Assert the HTTP status code equals *expected*."""
actual = self._response.status_code
passed = actual == expected
_emit("status_is", passed, expected=expected, actual=actual)
if not passed:
> raise AssertionError(
f"Expected status {expected}, got {actual}.\n"
f" URL: {self._response.url}\n"
f" Body: {self._response.response_body_text()[:500]}"
)
E AssertionError: Expected status 422, got 201.
E URL: https://gorest.in/public/v2/users
E Body: {
E "id": 1022,
E "name": "Terry Odonnell",
E "email": "terry.odonnell.5e303a23@hotmail.com",
E "gender": "male",
E "status": "active"
E }
/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pytest_api_core/assertions/response_assertions.py:55: AssertionError
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FAILED | ▶ tests/users/test_users.py::TestUsers::test_get_user user | 0.791s | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
POST
https://gorest.in/public/v2/users
201
679.6 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Frank Hall",
"email": "frank.hall.22a3a294@gmail.com",
"gender": "male",
"status": "active"
}
{
"id": 1021,
"name": "Frank Hall",
"email": "frank.hall.22a3a294@gmail.com",
"gender": "male",
"status": "active"
}
GET
https://gorest.in/public/v2/users/1021
200
55.0 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
{
"id": 1021,
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
DELETE
https://gorest.in/public/v2/users/1021
404
52.1 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
{
"message": "Resource not found"
}
ASSERTIONS
✅
status_is
expected=200
actual=200
✅
key_equals
key=id
expected=1021
actual=1021
❌
key_equals
key=name
expected=Frank Hall
actual=Terry Odonnell
LOGS
--- Captured log setup ---
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Frank Hall', 'email': 'frank.hall.22a3a294@gmail.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 201 105
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 201 (679.6 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1021,
"name": "Frank Hall",
"email": "frank.hall.22a3a294@gmail.com",
"gender": "male",
"status": "active"
}
--- Captured log call ---
DEBUG pytest_api_core.client:api_client.py:147 → GET https://gorest.in/public/v2/users/1021 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "GET /public/v2/users/1021 HTTP/1.1" 200 115
INFO pytest_api_core.client:api_client.py:162 ← GET https://gorest.in/public/v2/users/1021 200 (55.0 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1021,
"name": "Terry Odonnell",
"email": "terry.odonnell.5e303a23@hotmail.com",
"gender": "male",
"status": "active"
}
--- Captured log teardown ---
DEBUG pytest_api_core.client:api_client.py:147 → DELETE https://gorest.in/public/v2/users/1021 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "DELETE /public/v2/users/1021 HTTP/1.1" 404 32
INFO pytest_api_core.client:api_client.py:162 ← DELETE https://gorest.in/public/v2/users/1021 404 (52.1 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"message": "Resource not found"
}
FAILURE
self = <tests.users.test_users.TestUsers object at 0x7fc360afef60>
api_client = <APIClient base_url='https://gorest.in'>
new_user_payload = {'name': 'Frank Hall', 'email': 'frank.hall.22a3a294@gmail.com', 'gender': 'male', 'status': 'active'}
created_user = <APIResponse [201] https://gorest.in/public/v2/users (679.6 ms)>
def test_get_user(self, api_client, new_user_payload, created_user):
user_id = created_user.json()["id"]
response = api_client.get(f"{USERS_PATH}/{user_id}")
assert_that(response) \
.status_is(200) \
.key_equals("id", user_id) \
> .key_equals("name", new_user_payload["name"]) \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.key_equals("email", new_user_payload["email"]) \
.key_equals("gender", new_user_payload["gender"]) \
.key_equals("status", new_user_payload["status"])
tests/users/test_users.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_api_core.assertions.response_assertions.ResponseAssertions object at 0x7fc360b45ca0>
key = 'name', expected = 'Frank Hall'
def key_equals(self, key: str, expected: Any) -> "ResponseAssertions":
"""Assert top-level JSON key *key* equals *expected*."""
body = self._json_body()
if not isinstance(body, dict):
raise AssertionError(f"Response body is not a JSON object: {body!r}")
actual = body.get(key, _UNSET)
if actual is _UNSET:
_emit("key_equals", False, key=key, expected=expected, actual="<missing>")
raise AssertionError(f"Key '{key}' not found in response body.")
passed = actual == expected
_emit("key_equals", passed, key=key, expected=expected, actual=actual)
if not passed:
> raise AssertionError(f"Expected body['{key}'] = {expected!r}, got {actual!r}.")
E AssertionError: Expected body['name'] = 'Frank Hall', got 'Terry Odonnell'.
/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pytest_api_core/assertions/response_assertions.py:165: AssertionError
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PASSED | ▶ tests/users/test_users.py::TestUsers::test_update_user user | 0.186s | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
POST
https://gorest.in/public/v2/users
201
68.8 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Michael Miller",
"email": "michael.miller.84a027ab@hotmail.com",
"gender": "male",
"status": "active"
}
{
"id": 1022,
"name": "Michael Miller",
"email": "michael.miller.84a027ab@hotmail.com",
"gender": "male",
"status": "active"
}
PUT
https://gorest.in/public/v2/users/1022
200
50.8 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"id": 1022,
"name": "Updated Name",
"email": "michael.miller.84a027ab@hotmail.com",
"gender": "male",
"status": "inactive"
}
{
"id": 1022,
"name": "Updated Name",
"email": "michael.miller.84a027ab@hotmail.com",
"gender": "male",
"status": "inactive"
}
DELETE
https://gorest.in/public/v2/users/1022
204
61.6 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
— ASSERTIONS
✅
status_is
expected=200
actual=200
✅
key_equals
key=id
expected=1022
actual=1022
✅
key_equals
key=name
expected=Updated Name
actual=Updated Name
✅
key_equals
key=status
expected=inactive
actual=inactive
LOGS
--- Captured log setup ---
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Michael Miller', 'email': 'michael.miller.84a027ab@hotmail.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 201 115
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 201 (68.8 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1022,
"name": "Michael Miller",
"email": "michael.miller.84a027ab@hotmail.com",
"gender": "male",
"status": "active"
}
--- Captured log call ---
DEBUG pytest_api_core.client:api_client.py:147 → PUT https://gorest.in/public/v2/users/1022 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'id': 1022, 'name': 'Updated Name', 'email': 'michael.miller.84a027ab@hotmail.com', 'gender': 'male', 'status': 'inactive'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "PUT /public/v2/users/1022 HTTP/1.1" 200 115
INFO pytest_api_core.client:api_client.py:162 ← PUT https://gorest.in/public/v2/users/1022 200 (50.8 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1022,
"name": "Updated Name",
"email": "michael.miller.84a027ab@hotmail.com",
"gender": "male",
"status": "inactive"
}
--- Captured log teardown ---
DEBUG pytest_api_core.client:api_client.py:147 → DELETE https://gorest.in/public/v2/users/1022 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "DELETE /public/v2/users/1022 HTTP/1.1" 204 0
INFO pytest_api_core.client:api_client.py:162 ← DELETE https://gorest.in/public/v2/users/1022 204 (61.6 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PASSED | ▶ tests/users/test_users.py::TestUsers::test_patch_user user | 0.171s | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
POST
https://gorest.in/public/v2/users
201
55.1 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Christopher Fuller",
"email": "christopher.fuller.887d1b54@hotmail.com",
"gender": "male",
"status": "active"
}
{
"id": 1023,
"name": "Christopher Fuller",
"email": "christopher.fuller.887d1b54@hotmail.com",
"gender": "male",
"status": "active"
}
PATCH
https://gorest.in/public/v2/users/1023
200
54.7 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"status": "inactive"
}
{
"id": 1023,
"name": "Christopher Fuller",
"email": "christopher.fuller.887d1b54@hotmail.com",
"gender": "male",
"status": "inactive"
}
DELETE
https://gorest.in/public/v2/users/1023
404
56.8 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
{
"message": "Resource not found"
}
ASSERTIONS
✅
status_is
expected=200
actual=200
✅
key_equals
key=id
expected=1023
actual=1023
✅
key_equals
key=status
expected=inactive
actual=inactive
✅
key_equals
key=name
expected=Christopher Fuller
actual=Christopher Fuller
✅
key_equals
key=email
expected=christopher.fuller.887d1b54@hotmail.com
actual=christopher.fuller.887d1b54@hotmail.com
✅
key_equals
key=gender
expected=male
actual=male
LOGS
--- Captured log setup ---
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Christopher Fuller', 'email': 'christopher.fuller.887d1b54@hotmail.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 201 123
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 201 (55.1 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1023,
"name": "Christopher Fuller",
"email": "christopher.fuller.887d1b54@hotmail.com",
"gender": "male",
"status": "active"
}
--- Captured log call ---
DEBUG pytest_api_core.client:api_client.py:147 → PATCH https://gorest.in/public/v2/users/1023 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'status': 'inactive'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "PATCH /public/v2/users/1023 HTTP/1.1" 200 125
INFO pytest_api_core.client:api_client.py:162 ← PATCH https://gorest.in/public/v2/users/1023 200 (54.7 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1023,
"name": "Christopher Fuller",
"email": "christopher.fuller.887d1b54@hotmail.com",
"gender": "male",
"status": "inactive"
}
--- Captured log teardown ---
DEBUG pytest_api_core.client:api_client.py:147 → DELETE https://gorest.in/public/v2/users/1023 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "DELETE /public/v2/users/1023 HTTP/1.1" 404 32
INFO pytest_api_core.client:api_client.py:162 ← DELETE https://gorest.in/public/v2/users/1023 404 (56.8 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"message": "Resource not found"
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PASSED | ▶ tests/users/test_users.py::TestUsers::test_delete_user user | 0.215s | 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
POST
https://gorest.in/public/v2/users
201
50.3 ms
▶
Req Headers
Req Body
Res Headers
Res Body
{
"name": "Spencer Huff",
"email": "spencer.huff.6fa093b8@yahoo.com",
"gender": "male",
"status": "active"
}
{
"id": 1024,
"name": "Spencer Huff",
"email": "spencer.huff.6fa093b8@yahoo.com",
"gender": "male",
"status": "active"
}
DELETE
https://gorest.in/public/v2/users/1024
204
51.4 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
—
GET
https://gorest.in/public/v2/users/1024
404
57.0 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
{
"message": "Resource not found"
}
DELETE
https://gorest.in/public/v2/users/1024
404
50.1 ms
▶
Req Headers
Req Body
Res Headers
Res Body
—
{
"message": "Resource not found"
}
ASSERTIONS
✅
status_is
expected=204
actual=204
✅
status_is
expected=404
actual=404
LOGS
--- Captured log setup ---
DEBUG pytest_api_core.client:api_client.py:147 → POST https://gorest.in/public/v2/users headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body={'name': 'Spencer Huff', 'email': 'spencer.huff.6fa093b8@yahoo.com', 'gender': 'male', 'status': 'active'}
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "POST /public/v2/users HTTP/1.1" 201 109
INFO pytest_api_core.client:api_client.py:162 ← POST https://gorest.in/public/v2/users 201 (50.3 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"id": 1024,
"name": "Spencer Huff",
"email": "spencer.huff.6fa093b8@yahoo.com",
"gender": "male",
"status": "active"
}
--- Captured log call ---
DEBUG pytest_api_core.client:api_client.py:147 → DELETE https://gorest.in/public/v2/users/1024 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "DELETE /public/v2/users/1024 HTTP/1.1" 204 0
INFO pytest_api_core.client:api_client.py:162 ← DELETE https://gorest.in/public/v2/users/1024 204 (51.4 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body:
DEBUG pytest_api_core.client:api_client.py:147 → GET https://gorest.in/public/v2/users/1024 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "GET /public/v2/users/1024 HTTP/1.1" 404 32
INFO pytest_api_core.client:api_client.py:162 ← GET https://gorest.in/public/v2/users/1024 404 (57.0 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"message": "Resource not found"
}
--- Captured log teardown ---
DEBUG pytest_api_core.client:api_client.py:147 → DELETE https://gorest.in/public/v2/users/1024 headers={'User-Agent': 'python-requests/2.34.2', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json'} body=None
DEBUG urllib3.connectionpool:connectionpool.py:544 https://gorest.in:443 "DELETE /public/v2/users/1024 HTTP/1.1" 404 32
INFO pytest_api_core.client:api_client.py:162 ← DELETE https://gorest.in/public/v2/users/1024 404 (50.1 ms)
DEBUG pytest_api_core.client:api_client.py:166 response body: {
"message": "Resource not found"
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||