diff options
Diffstat (limited to 'tests/regressiontests/views')
-rw-r--r-- | tests/regressiontests/views/generic_urls.py | 7 | ||||
-rw-r--r-- | tests/regressiontests/views/templatetags/debugtags.py | 7 | ||||
-rw-r--r-- | tests/regressiontests/views/tests/__init__.py | 25 | ||||
-rw-r--r-- | tests/regressiontests/views/tests/debug.py | 9 | ||||
-rw-r--r-- | tests/regressiontests/views/tests/defaults.py | 5 | ||||
-rw-r--r-- | tests/regressiontests/views/tests/i18n.py | 6 | ||||
-rw-r--r-- | tests/regressiontests/views/tests/static.py | 7 | ||||
-rw-r--r-- | tests/regressiontests/views/urls.py | 4 | ||||
-rw-r--r-- | tests/regressiontests/views/views.py | 7 |
9 files changed, 49 insertions, 28 deletions
diff --git a/tests/regressiontests/views/generic_urls.py b/tests/regressiontests/views/generic_urls.py index cf2addc181..2d7a203cab 100644 --- a/tests/regressiontests/views/generic_urls.py +++ b/tests/regressiontests/views/generic_urls.py @@ -1,9 +1,10 @@ # -*- coding:utf-8 -*- -from django.conf.urls import patterns, url +from __future__ import absolute_import -from models import * +from django.conf.urls import patterns, url -import views +from . import views +from .models import Article, DateArticle, UrlArticle date_based_info_dict = { diff --git a/tests/regressiontests/views/templatetags/debugtags.py b/tests/regressiontests/views/templatetags/debugtags.py index 9b2c6611d8..cd2d2d9ad2 100644 --- a/tests/regressiontests/views/templatetags/debugtags.py +++ b/tests/regressiontests/views/templatetags/debugtags.py @@ -1,6 +1,9 @@ +from __future__ import absolute_import + from django import template - -from regressiontests.views import BrokenException + +from ..views import BrokenException + register = template.Library() diff --git a/tests/regressiontests/views/tests/__init__.py b/tests/regressiontests/views/tests/__init__.py index b888dde5dc..04537a2bcf 100644 --- a/tests/regressiontests/views/tests/__init__.py +++ b/tests/regressiontests/views/tests/__init__.py @@ -1,10 +1,15 @@ -from debug import * -from defaults import * -from generic.create_update import * -from generic.date_based import * -from generic.object_list import * -from generic.simple import * -from i18n import * -from shortcuts import * -from specials import * -from static import * +from __future__ import absolute_import + +from .debug import (DebugViewTests, ExceptionReporterTests, + ExceptionReporterTests, PlainTextReportTests, ExceptionReporterFilterTests, + AjaxResponseExceptionReporterFilter) +from .defaults import DefaultsTests +from .generic.create_update import (UpdateDeleteObjectTest, CreateObjectTest, + PostSaveRedirectTests, NoPostSaveNoAbsoluteUrl, AbsoluteUrlNoPostSave) +from .generic.date_based import MonthArchiveTest, ObjectDetailTest, DayArchiveTests +from .generic.object_list import ObjectListTest +from .generic.simple import RedirectToTest +from .i18n import JsI18NTests, I18NTests, JsI18NTestsMultiPackage +from .shortcuts import ShortcutTests +from .specials import URLHandling +from .static import StaticHelperTest, StaticTests diff --git a/tests/regressiontests/views/tests/debug.py b/tests/regressiontests/views/tests/debug.py index 093d925f0f..c6f248a8b8 100644 --- a/tests/regressiontests/views/tests/debug.py +++ b/tests/regressiontests/views/tests/debug.py @@ -1,4 +1,5 @@ -from __future__ import with_statement +from __future__ import with_statement, absolute_import + import inspect import os import sys @@ -13,9 +14,9 @@ from django.template import TemplateSyntaxError from django.views.debug import ExceptionReporter from django.core import mail -from regressiontests.views import BrokenException, except_args -from regressiontests.views.views import (sensitive_view, non_sensitive_view, - paranoid_view, custom_exception_reporter_filter_view) +from .. import BrokenException, except_args +from ..views import (sensitive_view, non_sensitive_view, paranoid_view, + custom_exception_reporter_filter_view) class DebugViewTests(TestCase): diff --git a/tests/regressiontests/views/tests/defaults.py b/tests/regressiontests/views/tests/defaults.py index 6378cf9c99..2dd40b4a1a 100644 --- a/tests/regressiontests/views/tests/defaults.py +++ b/tests/regressiontests/views/tests/defaults.py @@ -1,7 +1,10 @@ +from __future__ import absolute_import + from django.test import TestCase from django.contrib.contenttypes.models import ContentType -from regressiontests.views.models import Author, Article, UrlArticle +from ..models import Author, Article, UrlArticle + class DefaultsTests(TestCase): """Test django views in django/views/defaults.py""" diff --git a/tests/regressiontests/views/tests/i18n.py b/tests/regressiontests/views/tests/i18n.py index bd801b160d..2f67d525e1 100644 --- a/tests/regressiontests/views/tests/i18n.py +++ b/tests/regressiontests/views/tests/i18n.py @@ -1,5 +1,6 @@ # -*- coding:utf-8 -*- -from __future__ import with_statement +from __future__ import with_statement, absolute_import + import gettext from os import path @@ -8,7 +9,8 @@ from django.test import TestCase from django.utils.translation import override, activate from django.utils.text import javascript_quote -from regressiontests.views.urls import locale_dir +from ..urls import locale_dir + class I18NTests(TestCase): """ Tests django views in django/views/i18n.py """ diff --git a/tests/regressiontests/views/tests/static.py b/tests/regressiontests/views/tests/static.py index 0e76453719..3088a86eab 100644 --- a/tests/regressiontests/views/tests/static.py +++ b/tests/regressiontests/views/tests/static.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + import mimetypes from os import path @@ -6,8 +8,9 @@ from django.conf.urls.static import static from django.test import TestCase from django.http import HttpResponseNotModified -from regressiontests.views import urls -from regressiontests.views.urls import media_dir +from .. import urls +from ..urls import media_dir + class StaticTests(TestCase): """Tests django views in django/views/static.py""" diff --git a/tests/regressiontests/views/urls.py b/tests/regressiontests/views/urls.py index 2ce56b67f8..90d2382f71 100644 --- a/tests/regressiontests/views/urls.py +++ b/tests/regressiontests/views/urls.py @@ -1,9 +1,11 @@ # coding: utf-8 +from __future__ import absolute_import + from os import path from django.conf.urls import patterns, url, include -import views +from . import views base_dir = path.dirname(path.abspath(__file__)) diff --git a/tests/regressiontests/views/views.py b/tests/regressiontests/views/views.py index 02f765af1c..f2b4e79322 100644 --- a/tests/regressiontests/views/views.py +++ b/tests/regressiontests/views/views.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + import sys from django import forms @@ -11,9 +13,8 @@ from django.views.decorators.debug import (sensitive_post_parameters, sensitive_variables) from django.utils.log import getLogger -from regressiontests.views import BrokenException, except_args - -from models import Article +from . import BrokenException, except_args +from .models import Article def index_page(request): |