File: test_mail_debug.py

package info (click to toggle)
python-django-extensions 4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,820 kB
  • sloc: python: 18,601; javascript: 7,354; makefile: 108; xml: 17
file content (11 lines) | stat: -rw-r--r-- 370 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
# -*- coding: utf-8 -*-
from django.core.management import call_command
from unittest import mock


def test_initialize_mail_server():
    with mock.patch(
        "django_extensions.management.commands.mail_debug.asyncio"
    ) as asyncio:
        call_command("mail_debug", "2525")
        assert asyncio.get_event_loop.called, "asyncio.get_event_loop was not called"