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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bced53251d0a8310e0dd8ebe171391c3a52de9d1f6938a0f5d77f9b6c8d559d0 |
|
MD5 | ccef4f7cd5cd3924bb35d839591b54d8 |
|
BLAKE2b-256 | 2b835208e3105dbd35dca7940d6d187dd1297d72d819db2a095d178ba246ccd9 |
Close
Hashes for pytest_aws_apigateway-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbdaaf1bd6cee5dc3f0e5b43995f80eca6c96d2b1a53fd6c69d5b7f9d5b3a298 |
|
MD5 | 11125321bb90a17a3a916d0d28088eca |
|
BLAKE2b-256 | 3d4662cc0ae686ccfe6a2d8b1a82dc6057d8afd0fa7f9b7a3eaf1bc01760a624 |