File: test_runserver_plus.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 (14 lines) | stat: -rw-r--r-- 402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8 -*-
import pytest
from django.core.management import call_command

from unittest import mock


@pytest.mark.django_db
def test_initialize_runserver_plus():
    with mock.patch(
        "django_extensions.management.commands.runserver_plus.run_simple"
    ) as run_simple:
        call_command("runserver_plus")
        assert run_simple.called, "werkzeug.run_simple was not called"