Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Convert the remainder of the relative imports in the tests to be abso…

…lute imports.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8c0eefd066aa0e5bfe8c1006d055be8e2ad69a2b 1 parent f830166
Alex Gaynor authored October 13, 2011

Showing 144 changed files with 576 additions and 261 deletions. Show diff stats Hide diff stats

  1. 5  tests/regressiontests/generic_inline_admin/admin.py
  2. 2  tests/regressiontests/generic_inline_admin/models.py
  3. 6  tests/regressiontests/generic_inline_admin/tests.py
  4. 4  tests/regressiontests/generic_inline_admin/urls.py
  5. 7  tests/regressiontests/generic_relations_regress/models.py
  6. 7  tests/regressiontests/generic_relations_regress/tests.py
  7. 2  tests/regressiontests/generic_views/base.py
  8. 5  tests/regressiontests/generic_views/dates.py
  9. 4  tests/regressiontests/generic_views/detail.py
  10. 7  tests/regressiontests/generic_views/edit.py
  11. 4  tests/regressiontests/generic_views/forms.py
  12. 5  tests/regressiontests/generic_views/list.py
  13. 1  tests/regressiontests/generic_views/models.py
  14. 15  tests/regressiontests/generic_views/tests.py
  15. 6  tests/regressiontests/generic_views/urls.py
  16. 6  tests/regressiontests/generic_views/views.py
  17. 4  tests/regressiontests/get_or_create_regress/tests.py
  18. 2  tests/regressiontests/handlers/tests.py
  19. 1  tests/regressiontests/httpwrappers/tests.py
  20. 2  tests/regressiontests/i18n/commands/compilation.py
  21. 4  tests/regressiontests/i18n/commands/extraction.py
  22. 2  tests/regressiontests/i18n/contenttypes/tests.py
  23. 5  tests/regressiontests/i18n/forms.py
  24. 2  tests/regressiontests/i18n/models.py
  25. 2  tests/regressiontests/i18n/test_warnings.py
  26. 21  tests/regressiontests/i18n/tests.py
  27. 1  tests/regressiontests/initial_sql_regress/models.py
  28. 2  tests/regressiontests/initial_sql_regress/tests.py
  29. 4  tests/regressiontests/inline_formsets/tests.py
  30. 1  tests/regressiontests/introspection/models.py
  31. 5  tests/regressiontests/introspection/tests.py
  32. 6  tests/regressiontests/localflavor/au/forms.py
  33. 2  tests/regressiontests/localflavor/au/models.py
  34. 5  tests/regressiontests/localflavor/au/tests.py
  35. 6  tests/regressiontests/localflavor/mk/forms.py
  36. 3  tests/regressiontests/localflavor/mk/models.py
  37. 7  tests/regressiontests/localflavor/mk/tests.py
  38. 6  tests/regressiontests/localflavor/mx/forms.py
  39. 3  tests/regressiontests/localflavor/mx/models.py
  40. 5  tests/regressiontests/localflavor/mx/tests.py
  41. 86  tests/regressiontests/localflavor/tests.py
  42. 6  tests/regressiontests/localflavor/us/forms.py
  43. 3  tests/regressiontests/localflavor/us/models.py
  44. 7  tests/regressiontests/localflavor/us/tests.py
  45. 6  tests/regressiontests/logging_tests/tests.py
  46. 2  tests/regressiontests/m2m_regress/models.py
  47. 4  tests/regressiontests/m2m_regress/tests.py
  48. 3  tests/regressiontests/m2m_through_regress/models.py
  49. 6  tests/regressiontests/m2m_through_regress/tests.py
  50. 1  tests/regressiontests/managers_regress/models.py
  51. 4  tests/regressiontests/managers_regress/tests.py
  52. 5  tests/regressiontests/many_to_one_regress/tests.py
  53. 1  tests/regressiontests/max_lengths/models.py
  54. 5  tests/regressiontests/max_lengths/tests.py
  55. 4  tests/regressiontests/middleware_exceptions/urls.py
  56. 8  tests/regressiontests/model_fields/imagefield.py
  57. 13  tests/regressiontests/model_fields/tests.py
  58. 3  tests/regressiontests/model_forms_regress/models.py
  59. 4  tests/regressiontests/model_forms_regress/tests.py
  60. 1  tests/regressiontests/model_formsets_regress/models.py
  61. 4  tests/regressiontests/model_formsets_regress/tests.py
  62. 4  tests/regressiontests/model_inheritance_regress/tests.py
  63. 1  tests/regressiontests/model_inheritance_select_related/models.py
  64. 4  tests/regressiontests/model_inheritance_select_related/tests.py
  65. 1  tests/regressiontests/model_permalink/models.py
  66. 6  tests/regressiontests/model_permalink/tests.py
  67. 4  tests/regressiontests/model_regress/tests.py
  68. 3  tests/regressiontests/modeladmin/models.py
  69. 5  tests/regressiontests/modeladmin/tests.py
  70. 3  tests/regressiontests/multiple_database/models.py
  71. 4  tests/regressiontests/multiple_database/tests.py
  72. 1  tests/regressiontests/null_fk/models.py
  73. 8  tests/regressiontests/null_fk/tests.py
  74. 1  tests/regressiontests/null_fk_ordering/models.py
  75. 5  tests/regressiontests/null_fk_ordering/tests.py
  76. 1  tests/regressiontests/null_queries/models.py
  77. 4  tests/regressiontests/null_queries/tests.py
  78. 1  tests/regressiontests/one_to_one_regress/models.py
  79. 6  tests/regressiontests/one_to_one_regress/tests.py
  80. 3  tests/regressiontests/queries/models.py
  81. 13  tests/regressiontests/queries/tests.py
  82. 4  tests/regressiontests/queryset_pickle/models.py
  83. 4  tests/regressiontests/queryset_pickle/tests.py
  84. 1  tests/regressiontests/reverse_single_related/models.py
  85. 5  tests/regressiontests/reverse_single_related/tests.py
  86. 4  tests/regressiontests/select_related_onetoone/tests.py
  87. 1  tests/regressiontests/select_related_regress/models.py
  88. 8  tests/regressiontests/select_related_regress/tests.py
  89. 18  tests/regressiontests/serializers_regress/tests.py
  90. 2  tests/regressiontests/settings_tests/tests.py
  91. 1  tests/regressiontests/signals_regress/models.py
  92. 7  tests/regressiontests/signals_regress/tests.py
  93. 1  tests/regressiontests/signed_cookies_tests/tests.py
  94. 1  tests/regressiontests/signing/tests.py
  95. 16  tests/regressiontests/sites_framework/tests.py
  96. 1  tests/regressiontests/special_headers/models.py
  97. 2  tests/regressiontests/special_headers/tests.py
  98. 7  tests/regressiontests/special_headers/urls.py
  99. 1  tests/regressiontests/staticfiles_tests/tests.py
  100. 1  tests/regressiontests/string_lookup/models.py
  101. 5  tests/regressiontests/string_lookup/tests.py
  102. 5  tests/regressiontests/syndication/feeds.py
  103. 1  tests/regressiontests/syndication/models.py
  104. 4  tests/regressiontests/syndication/tests.py
  105. 5  tests/regressiontests/syndication/urls.py
  106. 5  tests/regressiontests/templates/alternate_urls.py
  107. 6  tests/regressiontests/templates/custom.py
  108. 4  tests/regressiontests/templates/response.py
  109. 1  tests/regressiontests/templates/templatetags/bad_tag.py
  110. 26  tests/regressiontests/templates/tests.py
  111. 5  tests/regressiontests/templates/urls.py
  112. 6  tests/regressiontests/test_client_regress/urls.py
  113. 4  tests/regressiontests/test_runner/tests.py
  114. 4  tests/regressiontests/test_utils/tests.py
  115. 4  tests/regressiontests/test_utils/urls.py
  116. 6  tests/regressiontests/test_utils/views.py
  117. 4  tests/regressiontests/transactions_regress/tests.py
  118. 6  tests/regressiontests/urlpatterns_reverse/extra_urls.py
  119. 6  tests/regressiontests/urlpatterns_reverse/included_named_urls.py
  120. 6  tests/regressiontests/urlpatterns_reverse/included_named_urls2.py
  121. 8  tests/regressiontests/urlpatterns_reverse/included_namespace_urls.py
  122. 6  tests/regressiontests/urlpatterns_reverse/included_urls.py
  123. 6  tests/regressiontests/urlpatterns_reverse/included_urls2.py
  124. 5  tests/regressiontests/urlpatterns_reverse/middleware.py
  125. 6  tests/regressiontests/urlpatterns_reverse/named_urls.py
  126. 6  tests/regressiontests/urlpatterns_reverse/namespace_urls.py
  127. 4  tests/regressiontests/urlpatterns_reverse/reverse_lazy_urls.py
  128. 14  tests/regressiontests/urlpatterns_reverse/tests.py
  129. 4  tests/regressiontests/urlpatterns_reverse/urlconf_outer.py
  130. 6  tests/regressiontests/urlpatterns_reverse/urls.py
  131. 6  tests/regressiontests/urlpatterns_reverse/urls_error_handlers_callables.py
  132. 6  tests/regressiontests/urlpatterns_reverse/urls_without_full_import.py
  133. 2  tests/regressiontests/utils/simplelazyobject.py
  134. 39  tests/regressiontests/utils/tests.py
  135. 7  tests/regressiontests/views/generic_urls.py
  136. 7  tests/regressiontests/views/templatetags/debugtags.py
  137. 25  tests/regressiontests/views/tests/__init__.py
  138. 9  tests/regressiontests/views/tests/debug.py
  139. 5  tests/regressiontests/views/tests/defaults.py
  140. 6  tests/regressiontests/views/tests/i18n.py
  141. 7  tests/regressiontests/views/tests/static.py
  142. 4  tests/regressiontests/views/urls.py
  143. 7  tests/regressiontests/views/views.py
  144. 3  tests/runtests.py
5  tests/regressiontests/generic_inline_admin/admin.py
... ...
@@ -1,9 +1,12 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.contrib import admin
2 4
 from django.contrib.contenttypes import generic
3 5
 
4  
-from models import (Media, PhoneNumber, Episode, EpisodeExtra, Contact,
  6
+from .models import (Media, PhoneNumber, Episode, EpisodeExtra, Contact,
5 7
     Category, EpisodePermanent, EpisodeMaxNum)
6 8
 
  9
+
7 10
 site = admin.AdminSite(name="admin")
8 11
 
9 12
 class MediaInline(generic.GenericTabularInline):
2  tests/regressiontests/generic_inline_admin/models.py
... ...
@@ -1,6 +1,6 @@
1  
-from django.db import models
2 1
 from django.contrib.contenttypes import generic
3 2
 from django.contrib.contenttypes.models import ContentType
  3
+from django.db import models
4 4
 
5 5
 
6 6
 class Episode(models.Model):
6  tests/regressiontests/generic_inline_admin/tests.py
... ...
@@ -1,5 +1,7 @@
1 1
 # coding: utf-8
2 2
 
  3
+from __future__ import absolute_import
  4
+
3 5
 from django.conf import settings
4 6
 from django.contrib import admin
5 7
 from django.contrib.admin.sites import AdminSite
@@ -9,9 +11,9 @@
9 11
 from django.test import TestCase
10 12
 
11 13
 # local test models
12  
-from models import (Episode, EpisodeExtra, EpisodeMaxNum, Media,
  14
+from .admin import MediaInline, MediaPermanentInline
  15
+from .models import (Episode, EpisodeExtra, EpisodeMaxNum, Media,
13 16
     EpisodePermanent, Category)
14  
-from admin import MediaInline, MediaPermanentInline
15 17
 
16 18
 
17 19
 class GenericAdminViewTest(TestCase):
4  tests/regressiontests/generic_inline_admin/urls.py
... ...
@@ -1,6 +1,8 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.conf.urls import patterns, include
2 4
 
3  
-import admin
  5
+from . import admin
4 6
 
5 7
 urlpatterns = patterns('',
6 8
     (r'^generic_inline_admin/admin/', include(admin.site.urls)),
7  tests/regressiontests/generic_relations_regress/models.py
... ...
@@ -1,9 +1,10 @@
1  
-from django.db import models
2 1
 from django.contrib.contenttypes import generic
3 2
 from django.contrib.contenttypes.models import ContentType
  3
+from django.db import models
  4
+
4 5
 
5  
-__all__ = ('Link', 'Place', 'Restaurant', 'Person', 'Address', 
6  
-           'CharLink', 'TextLink', 'OddRelation1', 'OddRelation2', 
  6
+__all__ = ('Link', 'Place', 'Restaurant', 'Person', 'Address',
  7
+           'CharLink', 'TextLink', 'OddRelation1', 'OddRelation2',
7 8
            'Contact', 'Organization', 'Note')
8 9
 
9 10
 class Link(models.Model):
7  tests/regressiontests/generic_relations_regress/tests.py
... ...
@@ -1,6 +1,9 @@
1  
-from django.test import TestCase
2 1
 from django.db.models import Q
3  
-from models import *
  2
+from django.test import TestCase
  3
+
  4
+from .models import (Address, Place, Restaurant, Link, CharLink, TextLink,
  5
+    Person, Contact, Note, Organization, OddRelation1, OddRelation2)
  6
+
4 7
 
5 8
 class GenericRelationTests(TestCase):
6 9
 
2  tests/regressiontests/generic_views/base.py
... ...
@@ -1,9 +1,9 @@
1 1
 import time
2  
-import unittest
3 2
 
4 3
 from django.core.exceptions import ImproperlyConfigured
5 4
 from django.http import HttpResponse
6 5
 from django.test import TestCase, RequestFactory
  6
+from django.utils import unittest
7 7
 from django.views.generic import View, TemplateView, RedirectView
8 8
 
9 9
 
5  tests/regressiontests/generic_views/dates.py
... ...
@@ -1,9 +1,12 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 import datetime
2 4
 
3 5
 from django.core.exceptions import ImproperlyConfigured
4 6
 from django.test import TestCase
5 7
 
6  
-from regressiontests.generic_views.models import Book
  8
+from .models import Book
  9
+
7 10
 
8 11
 class ArchiveIndexViewTests(TestCase):
9 12
     fixtures = ['generic-views-test-data.json']
4  tests/regressiontests/generic_views/detail.py
... ...
@@ -1,7 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.core.exceptions import ImproperlyConfigured
2 4
 from django.test import TestCase
3 5
 
4  
-from regressiontests.generic_views.models import Artist, Author, Page
  6
+from .models import Artist, Author, Page
5 7
 
6 8
 
7 9
 class DetailViewTest(TestCase):
7  tests/regressiontests/generic_views/edit.py
... ...
@@ -1,11 +1,14 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.core.exceptions import ImproperlyConfigured
2 4
 from django.core.urlresolvers import reverse
3 5
 from django import forms
4 6
 from django.test import TestCase
5 7
 from django.utils.unittest import expectedFailure
6 8
 
7  
-from regressiontests.generic_views.models import Artist, Author
8  
-from regressiontests.generic_views import views
  9
+from . import views
  10
+from .models import Artist, Author
  11
+
9 12
 
10 13
 class ModelFormMixinTests(TestCase):
11 14
     def test_get_form(self):
4  tests/regressiontests/generic_views/forms.py
... ...
@@ -1,6 +1,8 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django import forms
2 4
 
3  
-from regressiontests.generic_views.models import Author
  5
+from .models import Author
4 6
 
5 7
 
6 8
 class AuthorForm(forms.ModelForm):
5  tests/regressiontests/generic_views/list.py
... ...
@@ -1,7 +1,10 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.core.exceptions import ImproperlyConfigured
2 4
 from django.test import TestCase
3 5
 
4  
-from regressiontests.generic_views.models import Author, Artist
  6
+from .models import Author, Artist
  7
+
5 8
 
6 9
 class ListViewTests(TestCase):
7 10
     fixtures = ['generic-views-test-data.json']
1  tests/regressiontests/generic_views/models.py
... ...
@@ -1,5 +1,6 @@
1 1
 from django.db import models
2 2
 
  3
+
3 4
 class Artist(models.Model):
4 5
     name = models.CharField(max_length=100)
5 6
 
15  tests/regressiontests/generic_views/tests.py
... ...
@@ -1,5 +1,10 @@
1  
-from regressiontests.generic_views.base import ViewTest, TemplateViewTest, RedirectViewTest
2  
-from regressiontests.generic_views.dates import ArchiveIndexViewTests, YearArchiveViewTests, MonthArchiveViewTests, WeekArchiveViewTests, DayArchiveViewTests, DateDetailViewTests
3  
-from regressiontests.generic_views.detail import DetailViewTest
4  
-from regressiontests.generic_views.edit import ModelFormMixinTests, CreateViewTests, UpdateViewTests, DeleteViewTests
5  
-from regressiontests.generic_views.list import ListViewTests
  1
+from __future__ import absolute_import
  2
+
  3
+from .base import ViewTest, TemplateViewTest, RedirectViewTest
  4
+from .dates import (ArchiveIndexViewTests, YearArchiveViewTests,
  5
+    MonthArchiveViewTests, WeekArchiveViewTests, DayArchiveViewTests,
  6
+    DateDetailViewTests)
  7
+from .detail import DetailViewTest
  8
+from .edit import (ModelFormMixinTests, CreateViewTests, UpdateViewTests,
  9
+    DeleteViewTests)
  10
+from .list import ListViewTests
6  tests/regressiontests/generic_views/urls.py
... ...
@@ -1,8 +1,10 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.conf.urls import patterns, url
2  
-from django.views.generic import TemplateView
3 4
 from django.views.decorators.cache import cache_page
  5
+from django.views.generic import TemplateView
4 6
 
5  
-import views
  7
+from . import views
6 8
 
7 9
 
8 10
 urlpatterns = patterns('',
6  tests/regressiontests/generic_views/views.py
... ...
@@ -1,11 +1,13 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.contrib.auth.decorators import login_required
2 4
 from django.core.paginator import Paginator
3 5
 from django.core.urlresolvers import reverse
4 6
 from django.utils.decorators import method_decorator
5 7
 from django.views import generic
6 8
 
7  
-from regressiontests.generic_views.models import Artist, Author, Book, Page
8  
-from regressiontests.generic_views.forms import AuthorForm
  9
+from .forms import AuthorForm
  10
+from .models import Artist, Author, Book, Page
9 11
 
10 12
 
11 13
 class CustomTemplateView(generic.TemplateView):
4  tests/regressiontests/get_or_create_regress/tests.py
... ...
@@ -1,6 +1,8 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.test import TestCase
2 4
 
3  
-from models import Author, Publisher
  5
+from .models import Author, Publisher
4 6
 
5 7
 
6 8
 class GetOrCreateTests(TestCase):
2  tests/regressiontests/handlers/tests.py
... ...
@@ -1,7 +1,7 @@
1  
-from django.utils import unittest
2 1
 from django.conf import settings
3 2
 from django.core.handlers.wsgi import WSGIHandler
4 3
 from django.test import RequestFactory
  4
+from django.utils import unittest
5 5
 
6 6
 
7 7
 class HandlerTests(unittest.TestCase):
1  tests/regressiontests/httpwrappers/tests.py
@@ -5,6 +5,7 @@
5 5
         parse_cookie)
6 6
 from django.utils import unittest
7 7
 
  8
+
8 9
 class QueryDictTests(unittest.TestCase):
9 10
     def test_missing_key(self):
10 11
         q = QueryDict('')
2  tests/regressiontests/i18n/commands/compilation.py
@@ -8,8 +8,8 @@
8 8
 from django.core.management.commands.compilemessages import compile_messages
9 9
 from django.test import TestCase
10 10
 
11  
-LOCALE='es_AR'
12 11
 
  12
+LOCALE='es_AR'
13 13
 
14 14
 class MessageCompilationTests(TestCase):
15 15
 
4  tests/regressiontests/i18n/commands/extraction.py
@@ -2,8 +2,10 @@
2 2
 import os
3 3
 import re
4 4
 import shutil
5  
-from django.test import TestCase
  5
+
6 6
 from django.core import management
  7
+from django.test import TestCase
  8
+
7 9
 
8 10
 LOCALE='de'
9 11
 
2  tests/regressiontests/i18n/contenttypes/tests.py
@@ -3,10 +3,10 @@
3 3
 
4 4
 import os
5 5
 
  6
+from django.contrib.contenttypes.models import ContentType
6 7
 from django.test import TestCase
7 8
 from django.test.utils import override_settings
8 9
 from django.utils import translation
9  
-from django.contrib.contenttypes.models import ContentType
10 10
 
11 11
 
12 12
 class ContentTypeTests(TestCase):
5  tests/regressiontests/i18n/forms.py
... ...
@@ -1,7 +1,10 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django import forms
2 4
 from django.forms.extras import SelectDateWidget
3 5
 
4  
-from models import Company
  6
+from .models import Company
  7
+
5 8
 
6 9
 class I18nForm(forms.Form):
7 10
     decimal_field = forms.DecimalField(localize=True)
2  tests/regressiontests/i18n/models.py
... ...
@@ -1,7 +1,9 @@
1 1
 from datetime import datetime
  2
+
2 3
 from django.db import models
3 4
 from django.utils.translation import ugettext_lazy as _
4 5
 
  6
+
5 7
 class TestModel(models.Model):
6 8
     text = models.CharField(max_length=10, default=_('Anything'))
7 9
 
2  tests/regressiontests/i18n/test_warnings.py
... ...
@@ -1,5 +1,5 @@
1  
-from os.path import join, normpath, abspath, dirname
2 1
 import warnings
  2
+from os.path import join, normpath, abspath, dirname
3 3
 
4 4
 import django
5 5
 from django.conf import settings
21  tests/regressiontests/i18n/tests.py
... ...
@@ -1,5 +1,6 @@
1 1
 # -*- encoding: utf-8 -*-
2  
-from __future__ import with_statement
  2
+from __future__ import with_statement, absolute_import
  3
+
3 4
 import datetime
4 5
 import decimal
5 6
 import os
@@ -10,24 +11,24 @@
10 11
 from django.template import Template, Context
11 12
 from django.test import TestCase, RequestFactory
12 13
 from django.test.utils import override_settings
  14
+from django.utils import translation
13 15
 from django.utils.formats import (get_format, date_format, time_format,
14 16
     localize, localize_input, iter_format_modules, get_format_modules)
15 17
 from django.utils.importlib import import_module
16 18
 from django.utils.numberformat import format as nformat
17 19
 from django.utils.safestring import mark_safe, SafeString, SafeUnicode
18  
-from django.utils import translation
19 20
 from django.utils.translation import (ugettext, ugettext_lazy, activate,
20  
-        deactivate, gettext_lazy, pgettext, npgettext, to_locale,
21  
-        get_language_info, get_language, get_language_from_request)
  21
+    deactivate, gettext_lazy, pgettext, npgettext, to_locale,
  22
+    get_language_info, get_language, get_language_from_request)
22 23
 
23 24
 
24  
-from forms import I18nForm, SelectDateForm, SelectDateWidget, CompanyForm
25  
-from models import Company, TestModel
  25
+from .commands.tests import NoWrapExtractorTests, IgnoredExtractorTests, MessageCompilationTests, PoFileTests, BasicExtractorTests, JavascriptExtractorTests, CopyPluralFormsExtractorTests, SymlinkExtractorTests, ExtractorTests
  26
+from .contenttypes.tests import ContentTypeTests
  27
+from .forms import I18nForm, SelectDateForm, SelectDateWidget, CompanyForm
  28
+from .models import Company, TestModel
  29
+from .patterns.tests import URLRedirectWithoutTrailingSlashTests, URLTranslationTests, URLDisabledTests, URLTagTests, URLTestCaseBase, URLRedirectWithoutTrailingSlashSettingTests, URLNamespaceTests, URLPrefixTests, URLResponseTests, URLRedirectTests
  30
+from .test_warnings import DeprecationWarningTests
26 31
 
27  
-from commands.tests import *
28  
-from patterns.tests import *
29  
-from contenttypes.tests import *
30  
-from test_warnings import DeprecationWarningTests
31 32
 
32 33
 here = os.path.dirname(os.path.abspath(__file__))
33 34
 
1  tests/regressiontests/initial_sql_regress/models.py
@@ -4,6 +4,7 @@
4 4
 
5 5
 from django.db import models
6 6
 
  7
+
7 8
 class Simple(models.Model):
8 9
     name = models.CharField(max_length = 50)
9 10
 
2  tests/regressiontests/initial_sql_regress/tests.py
... ...
@@ -1,6 +1,6 @@
1 1
 from django.test import TestCase
2 2
 
3  
-from models import Simple
  3
+from .models import Simple
4 4
 
5 5
 
6 6
 class InitialSQLTests(TestCase):
4  tests/regressiontests/inline_formsets/tests.py
... ...
@@ -1,7 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.forms.models import inlineformset_factory
2 4
 from django.test import TestCase
3 5
 
4  
-from regressiontests.inline_formsets.models import Poet, Poem, School, Parent, Child
  6
+from .models import Poet, Poem, School, Parent, Child
5 7
 
6 8
 
7 9
 class DeletionTests(TestCase):
1  tests/regressiontests/introspection/models.py
... ...
@@ -1,5 +1,6 @@
1 1
 from django.db import models
2 2
 
  3
+
3 4
 class Reporter(models.Model):
4 5
     first_name = models.CharField(max_length=30)
5 6
     last_name = models.CharField(max_length=30)
5  tests/regressiontests/introspection/tests.py
... ...
@@ -1,8 +1,11 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from functools import update_wrapper
  4
+
2 5
 from django.db import connection
3 6
 from django.test import TestCase, skipUnlessDBFeature
4 7
 
5  
-from models import Reporter, Article
  8
+from .models import Reporter, Article
6 9
 
7 10
 #
8 11
 # The introspection module is optional, so methods tested here might raise
6  tests/regressiontests/localflavor/au/forms.py
... ...
@@ -1,5 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.forms import ModelForm
2  
-from models import AustralianPlace
  4
+
  5
+from .models import AustralianPlace
  6
+
3 7
 
4 8
 class AustralianPlaceForm(ModelForm):
5 9
     """ Form for storing an Australian place. """
2  tests/regressiontests/localflavor/au/models.py
... ...
@@ -1,5 +1,5 @@
1  
-from django.db import models
2 1
 from django.contrib.localflavor.au.models import AUStateField, AUPostCodeField
  2
+from django.db import models
3 3
 
4 4
 class AustralianPlace(models.Model):
5 5
     state = AUStateField(blank=True)
5  tests/regressiontests/localflavor/au/tests.py
... ...
@@ -1,10 +1,13 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 import re
2 4
 
3 5
 from django.test import SimpleTestCase
4 6
 from django.contrib.localflavor.au.forms import (AUPostCodeField,
5 7
     AUPhoneNumberField, AUStateSelect)
6 8
 
7  
-from forms import AustralianPlaceForm
  9
+from .forms import AustralianPlaceForm
  10
+
8 11
 
9 12
 SELECTED_OPTION_PATTERN = r'<option value="%s" selected="selected">'
10 13
 BLANK_OPTION_PATTERN = r'<option value="">'
6  tests/regressiontests/localflavor/mk/forms.py
... ...
@@ -1,5 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.forms import ModelForm
2  
-from models import MKPerson
  4
+
  5
+from .models import MKPerson
  6
+
3 7
 
4 8
 class MKPersonForm(ModelForm):
5 9
 
3  tests/regressiontests/localflavor/mk/models.py
... ...
@@ -1,6 +1,7 @@
1  
-from django.db import models
2 1
 from django.contrib.localflavor.mk.models import (
3 2
     MKIdentityCardNumberField, MKMunicipalityField, UMCNField)
  3
+from django.db import models
  4
+
4 5
 
5 6
 class MKPerson(models.Model):
6 7
     first_name = models.CharField(max_length = 20)
7  tests/regressiontests/localflavor/mk/tests.py
... ...
@@ -1,10 +1,13 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.contrib.localflavor.mk.forms import (
2 4
     MKIdentityCardNumberField, MKMunicipalitySelect, UMCNField)
3 5
 from django.test import SimpleTestCase
4 6
 
5  
-from forms import MKPersonForm
  7
+from .forms import MKPersonForm
  8
+
6 9
 
7  
-class MKLocalflavorTests(SimpleTestCase):
  10
+class MKLocalFlavorTests(SimpleTestCase):
8 11
 
9 12
     def setUp(self):
10 13
         self.form = MKPersonForm({
6  tests/regressiontests/localflavor/mx/forms.py
... ...
@@ -1,5 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.forms import ModelForm
2  
-from models import MXPersonProfile
  4
+
  5
+from .models import MXPersonProfile
  6
+
3 7
 
4 8
 class MXPersonProfileForm(ModelForm):
5 9
 
3  tests/regressiontests/localflavor/mx/models.py
... ...
@@ -1,6 +1,7 @@
1  
-from django.db import models
2 1
 from django.contrib.localflavor.mx.models import (
3 2
     MXStateField, MXRFCField, MXCURPField, MXZipCodeField)
  3
+from django.db import models
  4
+
4 5
 
5 6
 class MXPersonProfile(models.Model):
6 7
     state = MXStateField()
5  tests/regressiontests/localflavor/mx/tests.py
... ...
@@ -1,9 +1,12 @@
1 1
 # -*- coding: utf-8 -*-
  2
+from __future__ import absolute_import
  3
+
2 4
 from django.contrib.localflavor.mx.forms import (MXZipCodeField, MXRFCField,
3 5
     MXStateSelect, MXCURPField)
4 6
 from django.test import SimpleTestCase
5 7
 
6  
-from forms import MXPersonProfileForm
  8
+from .forms import MXPersonProfileForm
  9
+
7 10
 
8 11
 class MXLocalFlavorTests(SimpleTestCase):
9 12
 
86  tests/regressiontests/localflavor/tests.py
... ...
@@ -1,42 +1,44 @@
1  
-from ar.tests import *
2  
-from at.tests import *
3  
-from au.tests import *
4  
-from be.tests import *
5  
-from br.tests import *
6  
-from ca.tests import *
7  
-from ch.tests import *
8  
-from cl.tests import *
9  
-from cn.tests import *
10  
-from co.tests import *
11  
-from cz.tests import *
12  
-from de.tests import *
13  
-from ec.tests import *
14  
-from es.tests import *
15  
-from fi.tests import *
16  
-from fr.tests import *
17  
-from gb.tests import *
18  
-from generic.tests import *
19  
-from hr.tests import *
20  
-from id.tests import *
21  
-from ie.tests import *
22  
-from il.tests import *
23  
-from in_.tests import *
24  
-from is_.tests import *
25  
-from it.tests import *
26  
-from jp.tests import *
27  
-from kw.tests import *
28  
-from mk.tests import *
29  
-from mx.tests import *
30  
-from nl.tests import *
31  
-from pl.tests import *
32  
-from pt.tests import *
33  
-from py.tests import *
34  
-from ro.tests import *
35  
-from ru.tests import *
36  
-from se.tests import *
37  
-from si.tests import *
38  
-from sk.tests import *
39  
-from tr.tests import *
40  
-from us.tests import *
41  
-from uy.tests import *
42  
-from za.tests import *
  1
+from __future__ import absolute_import
  2
+
  3
+from .ar.tests import ARLocalFlavorTests
  4
+from .at.tests import ATLocalFlavorTests
  5
+from .au.tests import AULocalflavorTests
  6
+from .be.tests import BELocalFlavorTests
  7
+from .br.tests import BRLocalFlavorTests
  8
+from .ca.tests import CALocalFlavorTests
  9
+from .ch.tests import CHLocalFlavorTests
  10
+from .cl.tests import CLLocalFlavorTests
  11
+from .cn.tests import CNLocalFlavorTests
  12
+from .co.tests import COLocalFlavorTests
  13
+from .cz.tests import CZLocalFlavorTests
  14
+from .de.tests import DELocalFlavorTests
  15
+from .ec.tests import ECLocalFlavorTests
  16
+from .es.tests import ESLocalFlavorTests
  17
+from .fi.tests import FILocalFlavorTests
  18
+from .fr.tests import FRLocalFlavorTests
  19
+from .gb.tests import GBLocalFlavorTests
  20
+from .generic.tests import GenericLocalFlavorTests
  21
+from .hr.tests import HRLocalFlavorTests
  22
+from .id.tests import IDLocalFlavorTests
  23
+from .ie.tests import IELocalFlavorTests
  24
+from .il.tests import ILLocalFlavorTests
  25
+from .in_.tests import INLocalFlavorTests
  26
+from .is_.tests import ISLocalFlavorTests
  27
+from .it.tests import ITLocalFlavorTests
  28
+from .jp.tests import JPLocalFlavorTests
  29
+from .kw.tests import KWLocalFlavorTests
  30
+from .mk.tests import MKLocalFlavorTests
  31
+from .mx.tests import MXLocalFlavorTests
  32
+from .nl.tests import NLLocalFlavorTests
  33
+from .pl.tests import PLLocalFlavorTests
  34
+from .pt.tests import PTLocalFlavorTests
  35
+from .py.tests import PYLocalFlavorTests
  36
+from .ro.tests import ROLocalFlavorTests
  37
+from .ru.tests import RULocalFlavorTests
  38
+from .se.tests import SELocalFlavorTests
  39
+from .si.tests import SILocalFlavorTests
  40
+from .sk.tests import SKLocalFlavorTests
  41
+from .tr.tests import TRLocalFlavorTests
  42
+from .us.tests import USLocalFlavorTests
  43
+from .uy.tests import UYLocalFlavorTests
  44
+from .za.tests import ZALocalFlavorTests
6  tests/regressiontests/localflavor/us/forms.py
... ...
@@ -1,5 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.forms import ModelForm
2  
-from models import USPlace
  4
+
  5
+from .models import USPlace
  6
+
3 7
 
4 8
 class USPlaceForm(ModelForm):
5 9
 
3  tests/regressiontests/localflavor/us/models.py
... ...
@@ -1,6 +1,5 @@
  1
+from django.contrib.localflavor.us.models import USStateField, USPostalCodeField
1 2
 from django.db import models
2  
-from django.contrib.localflavor.us.models import USStateField
3  
-from django.contrib.localflavor.us.models import USPostalCodeField
4 3
 
5 4
 # When creating models you need to remember to add a app_label as
6 5
 # 'localflavor', so your model can be found
7  tests/regressiontests/localflavor/us/tests.py
... ...
@@ -1,11 +1,14 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.contrib.localflavor.us.forms import (USZipCodeField,
2 4
     USPhoneNumberField, USStateField, USStateSelect,
3 5
     USSocialSecurityNumberField)
4 6
 from django.test import SimpleTestCase
5 7
 
6  
-from forms import USPlaceForm
  8
+from .forms import USPlaceForm
  9
+
7 10
 
8  
-class USLocalflavorTests(SimpleTestCase):
  11
+class USLocalFlavorTests(SimpleTestCase):
9 12
 
10 13
     def setUp(self):
11 14
         self.form = USPlaceForm({'state':'GA', 'state_req':'NC', 'postal_code': 'GA', 'name':'impossible'})
6  tests/regressiontests/logging_tests/tests.py
@@ -3,11 +3,11 @@
3 3
 import copy
4 4
 
5 5
 from django.conf import compat_patch_logging_config
  6
+from django.core import mail
6 7
 from django.test import TestCase
7  
-
8  
-from django.utils.log import CallbackFilter, RequireDebugFalse, getLogger
9 8
 from django.test.utils import override_settings
10  
-from django.core import mail
  9
+from django.utils.log import CallbackFilter, RequireDebugFalse, getLogger
  10
+
11 11
 
12 12
 
13 13
 # logging config prior to using filter with mail_admins
2  tests/regressiontests/m2m_regress/models.py
... ...
@@ -1,5 +1,5 @@
1  
-from django.db import models
2 1
 from django.contrib.auth import models as auth
  2
+from django.db import models
3 3
 
4 4
 # No related name is needed here, since symmetrical relations are not
5 5
 # explicitly reversible.
4  tests/regressiontests/m2m_regress/tests.py
... ...
@@ -1,7 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.core.exceptions import FieldError
2 4
 from django.test import TestCase
3 5
 
4  
-from models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild,
  6
+from .models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild,
5 7
     SelfReferChildSibling, Worksheet)
6 8
 
7 9
 
3  tests/regressiontests/m2m_through_regress/models.py
... ...
@@ -1,6 +1,5 @@
1  
-from django.db import models
2  
-
3 1
 from django.contrib.auth.models import User
  2
+from django.db import models
4 3
 
5 4
 
6 5
 # Forward declared intermediate model
6  tests/regressiontests/m2m_through_regress/tests.py
... ...
@@ -1,3 +1,5 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 try:
2 4
     from cStringIO import StringIO
3 5
 except ImportError:
@@ -7,8 +9,8 @@
7 9
 from django.contrib.auth.models import User
8 10
 from django.test import TestCase
9 11
 
10  
-from models import (Person, Group, Membership, UserMembership,
11  
-                    Car, Driver, CarDriver)
  12
+from .models import (Person, Group, Membership, UserMembership, Car, Driver,
  13
+    CarDriver)
12 14
 
13 15
 
14 16
 class M2MThroughTestCase(TestCase):
1  tests/regressiontests/managers_regress/models.py
@@ -4,6 +4,7 @@
4 4
 
5 5
 from django.db import models
6 6
 
  7
+
7 8
 class OnlyFred(models.Manager):
8 9
     def get_query_set(self):
9 10
         return super(OnlyFred, self).get_query_set().filter(name='fred')
4  tests/regressiontests/managers_regress/tests.py
... ...
@@ -1,6 +1,8 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.test import TestCase
2 4
 
3  
-from models import Child1, Child2, Child3, Child4, Child5, Child6, Child7
  5
+from .models import Child1, Child2, Child3, Child4, Child5, Child6, Child7
4 6
 
5 7
 
6 8
 class ManagersRegressionTests(TestCase):
5  tests/regressiontests/many_to_one_regress/tests.py
... ...
@@ -1,7 +1,10 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.db import models
2 4
 from django.test import TestCase
3 5
 
4  
-from models import First, Second, Third, Parent, Child, Category, Record, Relation
  6
+from .models import First, Second, Third, Parent, Child, Category, Record, Relation
  7
+
5 8
 
6 9
 class ManyToOneRegressionTests(TestCase):
7 10
     def test_object_creation(self):
1  tests/regressiontests/max_lengths/models.py
... ...
@@ -1,5 +1,6 @@
1 1
 from django.db import models
2 2
 
  3
+
3 4
 class PersonWithDefaultMaxLengths(models.Model):
4 5
     email = models.EmailField()
5 6
     vcard = models.FileField(upload_to='/tmp')
5  tests/regressiontests/max_lengths/tests.py
... ...
@@ -1,6 +1,9 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django.utils import unittest
2 4
 
3  
-from regressiontests.max_lengths.models import PersonWithDefaultMaxLengths, PersonWithCustomMaxLengths
  5
+from .models import PersonWithDefaultMaxLengths, PersonWithCustomMaxLengths
  6
+
4 7
 
5 8
 class MaxLengthArgumentsTests(unittest.TestCase):
6 9
 
4  tests/regressiontests/middleware_exceptions/urls.py
... ...
@@ -1,7 +1,9 @@
1 1
 # coding: utf-8
  2
+from __future__ import absolute_import
  3
+
2 4
 from django.conf.urls import patterns
3 5
 
4  
-import views
  6
+from . import views
5 7
 
6 8
 urlpatterns = patterns('',
7 9
     (r'^middleware_exceptions/view/$', views.normal_view),
8  tests/regressiontests/model_fields/imagefield.py
... ...
@@ -1,3 +1,5 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 import os
2 4
 import shutil
3 5
 
@@ -5,14 +7,14 @@
5 7
 from django.core.files.images import ImageFile
6 8
 from django.test import TestCase
7 9
 
8  
-from models import (Image, Person, PersonWithHeight, PersonWithHeightAndWidth,
9  
-        PersonDimensionsFirst, PersonTwoImages, TestImageFieldFile)
  10
+from .models import (Image, Person, PersonWithHeight, PersonWithHeightAndWidth,
  11
+    PersonDimensionsFirst, PersonTwoImages, TestImageFieldFile)
10 12
 
11 13
 
12 14
 # If PIL available, do these tests.
13 15
 if Image:
14 16
 
15  
-    from models import temp_storage_dir
  17
+    from .models import temp_storage_dir
16 18
 
17 19
 
18 20
     class ImageFieldTestMixin(object):
13  tests/regressiontests/model_fields/tests.py
... ...
@@ -1,3 +1,5 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 import datetime
2 4
 from decimal import Decimal
3 5
 
@@ -8,14 +10,15 @@
8 10
 from django.db.models.fields.files import FieldFile
9 11
 from django.utils import unittest
10 12
 
11  
-from models import Foo, Bar, Whiz, BigD, BigS, Image, BigInt, Post, NullBooleanModel, BooleanModel, Document, RenamedField
  13
+from .models import (Foo, Bar, Whiz, BigD, BigS, Image, BigInt, Post,
  14
+    NullBooleanModel, BooleanModel, Document, RenamedField)
12 15
 
13 16
 # If PIL available, do these tests.
14 17
 if Image:
15  
-    from imagefield import (
16  
-        ImageFieldTests, ImageFieldTwoDimensionsTests, TwoImageFieldTests,
17  
-        ImageFieldNoDimensionsTests, ImageFieldOneDimensionTests,
18  
-        ImageFieldDimensionsFirstTests, ImageFieldUsingFileTests)
  18
+    from .imagefield import (ImageFieldTests, ImageFieldTwoDimensionsTests,
  19
+        TwoImageFieldTests, ImageFieldNoDimensionsTests,
  20
+        ImageFieldOneDimensionTests, ImageFieldDimensionsFirstTests,
  21
+        ImageFieldUsingFileTests)
19 22
 
20 23
 
21 24
 class BasicFieldTests(test.TestCase):
3  tests/regressiontests/model_forms_regress/models.py
... ...
@@ -1,6 +1,7 @@
1 1
 import os
2  
-from django.db import models
  2
+
3 3
 from django.core.exceptions import ValidationError
  4
+from django.db import models
4 5
 
5 6
 
6 7
 class Person(models.Model):
4  tests/regressiontests/model_forms_regress/tests.py
... ...
@@ -1,3 +1,5 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from datetime import date
2 4
 
3 5
 from django import forms
@@ -8,7 +10,7 @@
8 10
 from django.utils import unittest
9 11
 from django.test import TestCase
10 12
 
11  
-from models import (Person, RealPerson, Triple, FilePathModel, Article,
  13
+from .models import (Person, RealPerson, Triple, FilePathModel, Article,
12 14
     Publication, CustomFF, Author, Author1, Homepage, Document, Edition)
13 15
 
14 16
 
1  tests/regressiontests/model_formsets_regress/models.py
... ...
@@ -1,5 +1,6 @@
1 1
 from django.db import models
2 2
 
  3
+
3 4
 class User(models.Model):
4 5
     username = models.CharField(max_length=12, unique=True)
5 6
     serial = models.IntegerField()
4  tests/regressiontests/model_formsets_regress/tests.py
... ...
@@ -1,10 +1,12 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 from django import forms
2 4
 from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME
3 5
 from django.forms.util import ErrorDict, ErrorList
4 6
 from django.forms.models import modelform_factory, inlineformset_factory, modelformset_factory, BaseModelFormSet
5 7
 from django.test import TestCase
6 8
 
7  
-from models import User, UserSite, Restaurant, Manager, Network, Host
  9
+from .models import User, UserSite, Restaurant, Manager, Network, Host
8 10
 
9 11
 
10 12
 class InlineFormsetTests(TestCase):
4  tests/regressiontests/model_inheritance_regress/tests.py
@@ -2,12 +2,14 @@
2 2
 Regression tests for Model inheritance behaviour.
3 3
 """
4 4
 
  5
+from __future__ import absolute_import
  6
+
5 7
 import datetime
6 8
 from operator import attrgetter
7 9
 
8 10
 from django.test import TestCase
9 11
 
10  
-from models import (Place, Restaurant, ItalianRestaurant, ParkingLot,
  12
+from .models import (Place, Restaurant, ItalianRestaurant, ParkingLot,
11 13
     ParkingLot2, ParkingLot3, Supplier, Wholesaler, Child, SelfRefParent,
12 14
     SelfRefChild, ArticleWithAuthor, M2MChild, QualityControl, DerivedM,
13 15
     Person, BirthdayParty, BachelorParty, MessyBachelorParty,
1  tests/regressiontests/model_inheritance_select_related/models.py
@@ -5,6 +5,7 @@
4  tests/regressiontests/model_inheritance_select_related/tests.py
... ...
@@ -1,8 +1,10 @@
1  tests/regressiontests/model_permalink/models.py
... ...
@@ -1,5 +1,6 @@
6  tests/regressiontests/model_permalink/tests.py
... ...
@@ -1,5 +1,9 @@
4  tests/regressiontests/model_regress/tests.py
... ...
@@ -1,3 +1,5 @@
  1
+from __future__ import absolute_import
  2
+
1 3
 import datetime
2 4
 from operator import attrgetter
3 5
 
@@ -5,7 +7,7 @@
5 7
 from django.test import TestCase, skipUnlessDBFeature
6 8
 from django.utils import tzinfo
7 9
 
8  
-from models import (Worker, Article, Party, Event, Department,
  10
+from .models import (Worker, Article, Party, Event, Department,
9 11
     BrokenUnicodeMethod, NonAutoPK)
10 12
 
11 13
 
3  tests/regressiontests/modeladmin/models.py
... ...
@@ -1,6 +1,7 @@
1 1
 # coding: utf-8