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.4.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14d109bc4002bd4538efd1537d178bae68f85a3ca85d3d3ca587e785b3f0a251 |
|
MD5 | 1acb01b65ae76440ded504ef18733f06 |
|
BLAKE2b-256 | 83adcc6784cf27594b107731173487043f24184e89723537e65f2f71aaa1622e |
Close
Hashes for pytest_aws_apigateway-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa18b5056f17a317656b7fb7fb19c42e69977486e789daae6cfad5dcd21160a0 |
|
MD5 | 7153bd3ae032be769851c3729f306c89 |
|
BLAKE2b-256 | 097a857770be79003586ec81f4709aa28f66315598184a201cd1f4070c3ff546 |