Skip to content

Commit

Permalink
Add test coverage for api.py
Browse files Browse the repository at this point in the history
This change adds tests for the highlevel api that exposes the http
methods directly.
  • Loading branch information
Jan Scheffler committed Feb 27, 2024
1 parent eea3bbf commit ff8dd92
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_api.py
@@ -0,0 +1,12 @@
import pytest

import requests


@pytest.mark.parametrize(
"method", ("get", "head", "options", "delete", "put", "post", "patch")
)
def test_no_body_content_length(httpbin, method):
function = getattr(requests, method)
response = function(httpbin("/status/200"))
assert response.status_code == 200

0 comments on commit ff8dd92

Please sign in to comment.