How to test DELETE Request Using Python Requests

HOME

pip install -U requests

pip install -U pytest

import requests

ENDPOINT = 'https://reqres.in/api/users/2'


def test_delete_user():

    response = requests.delete(ENDPOINT)
    assert response.status_code == 204

Leave a comment