File: test_autonames_check.py

package info (click to toggle)
python-django-test-migrations 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: python: 1,479; makefile: 26
file content (20 lines) | stat: -rw-r--r-- 425 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import subprocess


def test_managepy_check():
    """Checks that checks do fail."""
    proc = subprocess.Popen(
        [
            'python3',
            'django_test_app/manage.py',
            'check',
            '--fail-level',
            'WARNING',
        ],
        stderr=subprocess.STDOUT,
        universal_newlines=True,
        encoding='utf8',
    )

    proc.communicate()
    assert proc.returncode == 1