-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4dd2769
commit 7ea8527
Showing
3 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
"""Test cases for the cli module.""" | ||
import pytest | ||
from cli import app | ||
from typer.testing import CliRunner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import pytest | ||
"""OpenAPI contract tests module.""" | ||
import schemathesis | ||
|
||
|
||
schema = schemathesis.from_pytest_fixture("protected_apikey_schema") | ||
|
||
|
||
@schema.parametrize() | ||
def test_api(case): | ||
"""Test the API with API-KEY protection.""" | ||
case.headers = {"X-API-KEY": "pygeoapi"} | ||
response = case.call_asgi() | ||
case.validate_response(response) |