Skip to content

Commit a8e23ce

Browse files
kosdmitbluetech
authored andcommitted
Add docstrings to mail fixtures
1 parent 829ba56 commit a8e23ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytest_django/plugin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ def mailoutbox(
578578
django_mail_patch_dns: None,
579579
_dj_autoclear_mailbox: None,
580580
) -> list[django.core.mail.EmailMessage] | None:
581+
"""A clean email outbox to which Django-generated emails are sent."""
581582
if not django_settings_is_configured():
582583
return None
583584

@@ -591,13 +592,15 @@ def django_mail_patch_dns(
591592
monkeypatch: pytest.MonkeyPatch,
592593
django_mail_dnsname: str,
593594
) -> None:
595+
"""Patch the server dns name used in email messages."""
594596
from django.core import mail
595597

596598
monkeypatch.setattr(mail.message, "DNS_NAME", django_mail_dnsname)
597599

598600

599601
@pytest.fixture()
600602
def django_mail_dnsname() -> str:
603+
"""Return server dns name for using in email messages."""
601604
return "fake-tests.example.com"
602605

603606

0 commit comments

Comments
 (0)