(aws_credentials)
| 59 | |
| 60 | @pytest.fixture(scope="session") |
| 61 | def moto_server(aws_credentials): |
| 62 | # use service container for Linux on GitHub Actions |
| 63 | if is_ci_environment() and not ( |
| 64 | is_platform_mac() or is_platform_arm() or is_platform_windows() |
| 65 | ): |
| 66 | yield "http://localhost:5000" |
| 67 | else: |
| 68 | moto_server = pytest.importorskip("moto.server") |
| 69 | server = moto_server.ThreadedMotoServer(port=0) |
| 70 | server.start() |
| 71 | host, port = server.get_host_and_port() |
| 72 | yield f"http://{host}:{port}" |
| 73 | server.stop() |
| 74 | |
| 75 | |
| 76 | @pytest.fixture |
nothing calls this directly
no test coverage detected