Changed to using TestCase from ietf.utils, and turned off coverage checking when loading templates in TemplateChecksTestCase.
- Legacy-Id: 12470
This commit is contained in:
parent
7d27849ee3
commit
db7e554c5e
|
@ -2,7 +2,7 @@ import os
|
|||
import sys
|
||||
import json
|
||||
|
||||
from django.test import Client, TestCase
|
||||
from django.test import Client
|
||||
from django.conf import settings
|
||||
from django.utils.importlib import import_module
|
||||
from django.db import models
|
||||
|
@ -12,6 +12,8 @@ from tastypie.test import ResourceTestCaseMixin
|
|||
|
||||
import debug # pyflakes:ignore
|
||||
|
||||
from ietf.utils.test_utils import TestCase
|
||||
|
||||
OMITTED_APPS = (
|
||||
'ietf.secr.meetings',
|
||||
'ietf.secr.proceedings',
|
||||
|
|
|
@ -18,7 +18,6 @@ from django.template import Context
|
|||
from django.template.defaulttags import URLNode
|
||||
from django.template.loader import get_template
|
||||
from django.templatetags.static import StaticNode
|
||||
from django.test import TestCase
|
||||
|
||||
import debug # pyflakes:ignore
|
||||
|
||||
|
@ -26,7 +25,8 @@ import ietf.urls
|
|||
from ietf.utils.management.commands import pyflakes
|
||||
from ietf.utils.mail import send_mail_text, send_mail_mime, outbox
|
||||
from ietf.utils.test_data import make_test_data
|
||||
from ietf.utils.test_runner import get_template_paths
|
||||
from ietf.utils.test_runner import get_template_paths, set_coverage_checking
|
||||
from ietf.utils.test_utils import TestCase
|
||||
from ietf.group.models import Group
|
||||
|
||||
skip_wiki_glue_testing = False
|
||||
|
@ -104,13 +104,13 @@ def get_callbacks(urllist):
|
|||
|
||||
return list(callbacks)
|
||||
|
||||
debug.debug = True
|
||||
class TemplateChecksTestCase(TestCase):
|
||||
|
||||
paths = []
|
||||
templates = {}
|
||||
|
||||
def setUp(self):
|
||||
set_coverage_checking(False)
|
||||
self.paths = list(get_template_paths())
|
||||
self.paths.sort()
|
||||
for path in self.paths:
|
||||
|
@ -120,6 +120,7 @@ class TemplateChecksTestCase(TestCase):
|
|||
pass
|
||||
|
||||
def tearDown(self):
|
||||
set_coverage_checking(True)
|
||||
pass
|
||||
|
||||
def test_parse_templates(self):
|
||||
|
|
|
@ -4,11 +4,11 @@ import debug
|
|||
debug.debug = True
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.test import TestCase
|
||||
|
||||
from tastypie.test import ResourceTestCaseMixin
|
||||
|
||||
from ietf.utils.test_data import make_test_data
|
||||
from ietf.utils.test_utils import TestCase
|
||||
|
||||
class RestApi(ResourceTestCaseMixin, TestCase):
|
||||
def list_recursively(self, resource, format):
|
||||
|
|
Loading…
Reference in a new issue