Skip to content

Commit

Permalink
fix(modules): Mailpit container base API URL helper method (#643)
Browse files Browse the repository at this point in the history
Minimal change to expose some helper methods on the `MailpitContainer`
  • Loading branch information
oliverlambson authored Jul 15, 2024
1 parent 49ce5a5 commit df07586
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/mailpit/testcontainers/mailpit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ def stop(self, *args: Any, **kwargs: Any) -> None:
def get_exposed_smtp_port(self) -> int:
return int(self.get_exposed_port(self.smtp_port))

def get_exposed_ui_port(self) -> int:
return int(self.get_exposed_port(self.ui_port))

def get_base_api_url(self) -> str:
return f"http://{self.get_container_host_ip()}:{self.get_exposed_ui_port()}"


class _TLSCertificates(NamedTuple):
private_key: bytes
Expand Down

0 comments on commit df07586

Please sign in to comment.