pytest plugin for AWS ApiGateway
Project description
pytest-aws-apigateway
Rationale
pytest_aws_apigateway
is a pytest plugin to make testing AWS lambda integrations with API Gateway easier.
Installation
pip install pytest-aws-apigateway
Usage
import httpx
from pytest_aws_apigateway import ApiGateway
def test_handler(apigateway: ApiGateway):
def handler(event, context):
return httpx.Response(200, json={"body": "hello"})
apigateway.add_integration("/", handler=handler, method="GET", endpoint="https://some/")
with httpx.Client() as client:
resp = client.get("https://some/")
assert resp.json() == {"body": "hello"}
License
pytest-aws-apigateway
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pytest_aws_apigateway-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 820a8245c6552c8b6d1f498bb8ecbae2eed49ff090a0dcb7b411d6968310d729 |
|
MD5 | 73c00128f6b03813a843c16c351d7980 |
|
BLAKE2b-256 | 64461e24a162adbbceb932500b493aca668ee60cd12e310282535c16a1eabfd1 |
Close
Hashes for pytest_aws_apigateway-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7cc005f57872c34697a09969bd7892f194cbbf197635f30ec0ec668b8a10f30 |
|
MD5 | e3a49f66abb3cdf43384ee96d7ea9d34 |
|
BLAKE2b-256 | 96269ec82fb8563f13ee31366c807871d6451a495e77886bd59b553676dc7c72 |