File: test_find_template.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 (19 lines) | stat: -rw-r--r-- 597 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
# -*- coding: utf-8 -*-
import os

from django.core.management import call_command
from django.test import TestCase


class FindTemplateTests(TestCase):
    def setUp(self):
        self.project_root = os.path.join('tests', 'testapp')
        self._settings = os.environ.get('DJANGO_SETTINGS_MODULE')
        os.environ['DJANGO_SETTINGS_MODULE'] = 'django_extensions.settings'

    def tearDown(self):
        if self._settings:
            os.environ['DJANGO_SETTINGS_MODULE'] = self._settings

    def test_finding_template(self):
        call_command('find_template', 'admin/change_form.html')