File: test_etc.py

package info (click to toggle)
python-pytest-djangoapp 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 396 kB
  • sloc: python: 1,116; makefile: 114; sh: 6
file content (20 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys

import pytest

from pytest_djangoapp import configure_djangoapp_plugin
from pytest_djangoapp.configuration import Configuration


@pytest.mark.skipif(sys.version_info > (2, 0), reason='teardown without setup should pass')
def test_teardown_without_setup():
    assert True


@pytest.mark.skipif(sys.version_info < (3, 0), reason='whole project test are for Py 3')
def test_whole_project_testing(request):
    configure_djangoapp_plugin('pytest_djangoapp.tests.settings_project')
    settings_dict = Configuration.get_combined(request.config)
    assert '_' not in settings_dict
    assert 'SOME_ATTR' in settings_dict
    assert 'some_function' not in settings_dict