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
def test_root_resource(apigateway_mock: ApiGatewayMock):
def handler(event, context):
return {"statusCode": 200, "body": json.dumps({"body": "hello"})}
apigateway_mock.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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccd809058249f58c215ce7b6a1cda1662edc30ad4fddea100dba814dd2ec5404 |
|
MD5 | b02588c6a7c166f8a65af470689575fe |
|
BLAKE2b-256 | 5c4a2407eea26dda795936c1f618bc8f61368a24cc7c2f76804bfdc7071fc38a |
Close
Hashes for pytest_aws_apigateway-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ca9df0174260120946e373edbe63056723c8975d0d730662070b3ef316c11c5 |
|
MD5 | 2417d1cfad5dcfa0138e4b41848ec851 |
|
BLAKE2b-256 | 8724b13f25fd0453d72f5cf9689a4a9c070b7f1daaae4ea2d3eb22ff90d3ba96 |