Skip to content

Commit 2a514af

Browse files
committed
fix for wait_container_is_ready decorator being depreciated
1 parent 2c4ef95 commit 2a514af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ classifiers = [
2929
"Topic :: Software Development :: Quality Assurance",
3030
"Topic :: Software Development :: Libraries :: Python Modules",
3131
]
32-
requires-python = ">=3.9, <3.14"
32+
requires-python = ">=3.9.2, <3.14"
3333
dependencies = [
3434
"requests>=2.32.4"
3535
]
3636

3737
[project.optional-dependencies]
3838
testing = [
3939
"docker>=7.1.0",
40-
"testcontainers>=3.7.1,<4.0.0",
40+
"testcontainers>=4.13.2",
4141
]
4242

4343
[dependency-groups]

wiremock/testing/testcontainer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import requests
1313
from testcontainers.core.container import DockerContainer
1414
from testcontainers.core.exceptions import ContainerStartException
15-
from testcontainers.core.waiting_utils import wait_container_is_ready
15+
from testcontainers.core.wait_strategies import HttpWaitStrategy
1616

1717
from wiremock.resources.mappings.models import Mapping
1818

@@ -187,7 +187,6 @@ def reload_mappings(self) -> requests.Response:
187187

188188
return resp
189189

190-
@wait_container_is_ready()
191190
def configure(self) -> None:
192191
if not self.server_running():
193192
raise WireMockContainerException(
@@ -221,6 +220,7 @@ def get_url(self, path: str) -> str:
221220
def start(self, cmd: Optional[str] = None) -> "WireMockContainer":
222221
self.with_command(cmd)
223222
super().start()
223+
self.waiting_for(HttpWaitStrategy(self.https_server_port if self.secure else self.http_server_port))
224224
self.configure()
225225
return self
226226

0 commit comments

Comments
 (0)