Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
.. image:: https://img.shields.io/pypi/v/pytest-localstack.svg :alt: PyPI :target: https://pypi.org/project/pytest-localstack/
.. image:: https://img.shields.io/travis/mintel/pytest-localstack/master.svg :alt: Travis-CI :target: https://travis-ci.org/mintel/pytest-localstack
.. image:: https://img.shields.io/codecov/c/github/mintel/pytest-localstack.svg :alt: Codecov :target: https://codecov.io/gh/mintel/pytest-localstack
.. image:: https://img.shields.io/github/license/mintel/pytest-localstack.svg :target: https://github.com/mintel/pytest-localstack/blob/master/LICENSE
.. image:: https://img.shields.io/github/issues/mintel/pytest-localstack.svg :target: https://github.com/mintel/pytest-localstack/issues
.. image:: https://img.shields.io/github/forks/mintel/pytest-localstack.svg :target: https://github.com/mintel/pytest-localstack/network
.. image:: https://img.shields.io/github/stars/mintel/pytest-localstack.svg :target: https://github.com/mintel/pytest-localstack/stargazers
pytest-localstack is a plugin for pytest_ to create AWS_ integration tests via a Localstack_ Docker container.
Read The Docs
_
Requires:
Tested against Python >= 3.6.
.. _pytest: http://docs.pytest.org/ .. _AWS: https://aws.amazon.com/ .. _Localstack: https://github.com/localstack/localstack .. _Read the Docs: https://pytest-localstack.readthedocs.io/
pytest fixtures
_ that start and stop a Localstack container... _pytest fixtures: https://docs.pytest.org/en/stable/fixture.html
.. code-block:: python
import boto3
import pytest_localstack
localstack = pytest_localstack.patch_fixture(
services=["s3"], # Limit to the AWS services you need.
scope='module', # Use the same Localstack container for all tests in this module.
autouse=True, # Automatically use this fixture in tests.
)
def test_s3_bucket_creation():
s3 = boto3.resource('s3') # Botocore/boto3 will be patched to use Localstack
assert len(list(s3.buckets.all())) == 0
bucket = s3.Bucket('foobar')
bucket.create()
assert len(list(s3.buckets.all())) == 1
.. code-block:: bash
$ pip install pytest-localstack
.. _aiobotocore: https://github.com/aio-libs/aiobotocore
FAQs
Pytest plugin for AWS integration tests
We found that pytest-localstack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.