"""pytest config for functional tests.""" import urllib.request import pytest _MOTO_URL = "http://moto:5000" @pytest.fixture(autouse=True) def moto_server(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("AWS_ENDPOINT_URL", _MOTO_URL) monkeypatch.setenv("AWS_ACCESS_KEY_ID", "test") monkeypatch.setenv("AWS_SECRET_ACCESS_KEY", "test") monkeypatch.setenv("AWS_DEFAULT_REGION", "us-east-1") urllib.request.urlopen(f"{_MOTO_URL}/moto-api/reset", data=b"")