HTTP plugin for Tavern with AWS4Auth
Project description
Tavern AWS plugin
This is a Tavern plugin to add AWS Sig4 authentication headers to your calls using requests-aws4auth plugin.
Usage
Install
Regular install via pip: pip install tavern-aws
Tavern integration
Set option tavern_http_backend to aws.
You can do it via project options:
[tool.pytest.ini_options]
tavern_http_backend = aws
or via conftest.py:
def pytest_configure(config: pytest.Config):
config.option.tavern_http_backend = "aws"
Change it back to requests to use regular Tavern's REST plugin.
Tests
Add necessary bits to your test file:
test_name: Call endpoint with IAM auth
aws:
access_key: xxxxxxxxxxxxxxxxxxxx
secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
service: appsync
region: us-east-1
stages:
- name: first stage
You can add session_token, e.g. if you use SSO.
You can suplly credentials either manually or from boto3 session object via pytest fixtures.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tavern_aws-1.0.1.tar.gz.
File metadata
- Download URL: tavern_aws-1.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38607e0282e56a0fc9b987cdab5f7902847fd6ef9e6b3b88697c5cfe437a39c6
|
|
| MD5 |
a200b156370496cab15ff9717ee643eb
|
|
| BLAKE2b-256 |
65384ed9dfb67d7209a9909530b1e6b44df1f6036c7e1ceb620d01375ce44063
|
File details
Details for the file tavern_aws-1.0.1-py3-none-any.whl.
File metadata
- Download URL: tavern_aws-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
101bc8846f9edd7583895e06cc0fedb7cac39cad47adc71667342856ea3e6c6d
|
|
| MD5 |
57ac107d26933ba26d3be28304cb1f56
|
|
| BLAKE2b-256 |
2bf9e8df63f8789f5543021767066a2b040f82a71615770d8ad21e15833c6cc3
|