r"""Check if the API Server is running. Returns: bool: Whether the API Server is running.
(self)
| 349 | |
| 350 | @property |
| 351 | def ok(self) -> bool: |
| 352 | r"""Check if the API Server is running. |
| 353 | |
| 354 | Returns: |
| 355 | bool: Whether the API Server is running. |
| 356 | """ |
| 357 | if not self.container: |
| 358 | return False |
| 359 | try: |
| 360 | _ = requests.get(f"http://localhost:{self.port}") |
| 361 | return True |
| 362 | except requests.exceptions.ConnectionError: |
| 363 | return False |
| 364 | |
| 365 | def wait(self, timeout: int = 10) -> bool: |
| 366 | r"""Wait for the API Server to be ready. |
nothing calls this directly
no outgoing calls
no test coverage detected