Metadata-Version: 2.3
Name: tavern-aws
Version: 1.0.1
Summary: HTTP plugin for Tavern with AWS4Auth
Keywords: testing,pytest,tavern,aws
Author: Alexander Eresov
Author-email: aeresov@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Testing
Requires-Dist: requests-aws4auth (>=1.3.1,<2.0.0)
Requires-Dist: tavern (>=2.15.0,<3.0.0)
Project-URL: Homepage, https://github.com/aeresov/tavern-aws
Description-Content-Type: text/markdown

# Tavern AWS plugin

This is a [Tavern](https://github.com/taverntesting/tavern) plugin to add AWS Sig4 authentication headers to your calls using [requests-aws4auth
](https://github.com/tedder/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:
```toml
[tool.pytest.ini_options]
tavern_http_backend = aws
```
or via conftest.py:
```python
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:
```yaml
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.

