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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf8dc3fc2f2cc701c5b2b72f83c3cec6f16f285844f6eeaa7f35c7d58cb0ab3c |
|
MD5 | dd7c5704138fd7ac9ae8683abd816dd1 |
|
BLAKE2b-256 | 382c9c84f540f0aa2a3bc6cb7724548eb70139432b6597d306db3bd271135e8f |
Close
Hashes for pytest_aws_apigateway-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34164eab3d55bebf754fd5aefcbfbba1dc3f0366ad6908bd3f8bcd7b05625c6d |
|
MD5 | b37385bccefbf854b6aee6ee14d7e5f7 |
|
BLAKE2b-256 | 993dc63c2a494c29fd2895548b93868fc255590d295810ad384612dc130022b5 |