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 0a3a20d
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_highlevel_api(httpbin, method):
function = getattr(requests, method)
response = function(httpbin("/status/200"))
assert response.status_code == 200

0 comments on commit 0a3a20d

Please sign in to comment.