Skip to content

Commit

Permalink
fix sphinx docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlambson committed Jun 30, 2024
1 parent f4b2278 commit ba698a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions modules/mailpit/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.. autoclass:: testcontainers.mailpit.MailpitUser
.. autoclass:: testcontainers.mailpit.MailpitContainer
.. title:: testcontainers.mailpit.MailpitContainer
12 changes: 5 additions & 7 deletions modules/mailpit/testcontainers/mailpit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import logging
import os
import tempfile
from datetime import UTC, datetime, timedelta
Expand All @@ -27,10 +26,10 @@
from testcontainers.core.container import DockerContainer
from testcontainers.core.waiting_utils import wait_for_logs

logger = logging.getLogger(__name__)


class MailpitUser(NamedTuple):
"""Mailpit user for authentication"""

username: str
password: str

Expand All @@ -43,9 +42,9 @@ class MailpitContainer(DockerContainer): # type: ignore[misc]
user/password.
Options:
- require_tls = True forces the use of SSL
- users = [MailpitUser("jane", "secret"), MailpitUser("ron", "pass2")] only
allows login with jane:secret or ron:pass2
- ``require_tls = True`` forces the use of SSL
- ``users = [MailpitUser("jane", "secret"), MailpitUser("ron", "pass2")]``
only allows login with ``jane:secret`` or ``ron:pass2``
Example:
Expand All @@ -65,7 +64,6 @@ class MailpitContainer(DockerContainer): # type: ignore[misc]
... code, _ = server.login("any", "auth")
... assert code == 235 # authentication successful
... # use server.sendmail(...) to send emails
"""

def __init__( # type: ignore[no-untyped-def]
Expand Down

0 comments on commit ba698a4

Please sign in to comment.