File: test_runserver_plus.py

package info (click to toggle)
python-django-extensions 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,396 kB
  • sloc: python: 11,858; makefile: 116
file content (12 lines) | stat: -rw-r--r-- 413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# -*- coding: utf-8 -*-
import mock
import pytest
from django_extensions.management.commands import runserver_plus


@pytest.mark.django_db
def test_initialize_runserver_plus():
    with mock.patch('werkzeug.run_simple') as run_simple:
        command = runserver_plus.Command()
        command.run_from_argv(['manage.py', 'runserver_plus'])
        assert run_simple.called, 'werkzeug.run_simple was not called'