Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed some tests and removed references to modeltests/regressiontests.

  • Loading branch information...
commit 33836cf88dd08ebd66d19ad7f732b12f089abd27 1 parent 737a5d7
@apollo13 apollo13 authored
Showing with 385 additions and 377 deletions.
  1. +1 −1  tests/admin_changelist/tests.py
  2. +5 −5 tests/admin_inlines/tests.py
  3. +71 −64 tests/admin_scripts/tests.py
  4. +1 −1  tests/admin_validation/tests.py
  5. +34 −34 tests/admin_views/tests.py
  6. +2 −2 tests/admin_widgets/tests.py
  7. +7 −7 tests/cache/tests.py
  8. +1 −1  tests/commands_sql/tests.py
  9. +7 −7 tests/comment_tests/custom_comments/__init__.py
  10. +9 −9 tests/comment_tests/tests/__init__.py
  11. +6 −6 tests/comment_tests/tests/app_api_tests.py
  12. +1 −1  tests/comment_tests/tests/feed_tests.py
  13. +1 −1  tests/comment_tests/tests/moderation_view_tests.py
  14. +1 −1  tests/conditional_processing/models.py
  15. +1 −1  tests/context_processors/tests.py
  16. +1 −1  tests/empty/no_models/tests.py
  17. +1 −1  tests/empty/tests.py
  18. +1 −1  tests/file_storage/tests.py
  19. 0  tests/{views/templatetags → forms_tests}/__init__.py
  20. 0  tests/{forms → forms_tests}/models.py
  21. 0  tests/{forms → forms_tests}/templates/forms/article_form.html
  22. 0  tests/{forms → forms_tests}/tests/__init__.py
  23. +1 −1  tests/{forms → forms_tests}/tests/error_messages.py
  24. 0  tests/{forms → forms_tests}/tests/extra.py
  25. +6 −6 tests/{forms → forms_tests}/tests/fields.py
  26. 0  tests/{forms → forms_tests}/tests/filepath_test_files/.dot-file
  27. 0  tests/{forms → forms_tests}/tests/filepath_test_files/directory/.keep
  28. 0  tests/{forms → forms_tests}/tests/filepath_test_files/fake-image.jpg
  29. 0  tests/{forms → forms_tests}/tests/filepath_test_files/real-text-file.txt
  30. 0  tests/{forms → forms_tests}/tests/forms.py
  31. 0  tests/{forms → forms_tests}/tests/formsets.py
  32. 0  tests/{forms → forms_tests}/tests/input_formats.py
  33. 0  tests/{forms → forms_tests}/tests/media.py
  34. 0  tests/{forms → forms_tests}/tests/models.py
  35. +2 −2 tests/{forms → forms_tests}/tests/regressions.py
  36. 0  tests/{forms → forms_tests}/tests/util.py
  37. 0  tests/{forms → forms_tests}/tests/validators.py
  38. +1 −1  tests/{forms → forms_tests}/tests/widgets.py
  39. +1 −1  tests/{forms → forms_tests}/urls.py
  40. 0  tests/{forms → forms_tests}/views.py
  41. +5 −5 tests/generic_inline_admin/tests.py
  42. +1 −1  tests/generic_views/base.py
  43. +6 −6 tests/generic_views/dates.py
  44. +1 −1  tests/generic_views/detail.py
  45. +4 −4 tests/generic_views/edit.py
  46. +1 −1  tests/generic_views/list.py
  47. +1 −1  tests/handlers/tests.py
  48. +4 −4 tests/i18n/patterns/tests.py
  49. +1 −1  tests/i18n/patterns/urls/default.py
  50. +1 −1  tests/i18n/patterns/urls/wrong.py
  51. +5 −5 tests/i18n/tests.py
  52. +3 −3 tests/inline_formsets/tests.py
  53. +1 −1  tests/invalid_models/tests.py
  54. +4 −4 tests/logging_tests/tests.py
  55. +5 −5 tests/mail/tests.py
  56. +11 −11 tests/middleware/tests.py
  57. +6 −6 tests/middleware_exceptions/tests.py
  58. +1 −1  tests/model_inheritance_same_model_name/models.py
  59. +3 −3 tests/model_inheritance_same_model_name/tests.py
  60. +1 −1  tests/model_permalink/tests.py
  61. +3 −2 tests/runtests.py
  62. +1 −1  tests/servers/tests.py
  63. +3 −3 tests/special_headers/tests.py
  64. +6 −6 tests/staticfiles_tests/tests.py
  65. +1 −1  tests/swappable_models/tests.py
  66. +1 −1  tests/syndication/tests.py
  67. 0  tests/{utils/test_module → template_tests}/__init__.py
  68. 0  tests/{templates → template_tests}/alternate_urls.py
  69. 0  tests/{templates → template_tests}/callables.py
  70. 0  tests/{templates → template_tests}/context.py
  71. 0  tests/{templates → template_tests}/custom.py
  72. 0  tests/{templates → template_tests}/eggs/tagsegg.egg
  73. 0  tests/{templates → template_tests}/filters.py
  74. 0  tests/{templates → template_tests}/loaders.py
  75. 0  tests/{templates → template_tests}/models.py
  76. 0  tests/{templates → template_tests}/nodelist.py
  77. 0  tests/{templates → template_tests}/parser.py
  78. +5 −5 tests/{templates → template_tests}/response.py
  79. 0  tests/{templates → template_tests}/smartif.py
  80. 0  tests/{templates → template_tests}/templates/broken_base.html
  81. 0  tests/{templates → template_tests}/templates/first/test.html
  82. 0  tests/{templates → template_tests}/templates/inclusion.html
  83. 0  tests/{templates → template_tests}/templates/response.html
  84. 0  tests/{templates → template_tests}/templates/second/test.html
  85. 0  tests/{templates → template_tests}/templates/ssi include with spaces.html
  86. 0  tests/{templates → template_tests}/templates/ssi_include.html
  87. 0  tests/{templates → template_tests}/templates/test_context.html
  88. 0  tests/{templates → template_tests}/templates/test_extends_error.html
  89. 0  tests/{templates → template_tests}/templates/test_incl_tag_current_app.html
  90. 0  tests/{templates → template_tests}/templates/test_incl_tag_use_l10n.html
  91. 0  tests/{templates → template_tests}/templates/test_include_error.html
  92. 0  tests/{utils → template_tests/templatetags}/__init__.py
  93. 0  tests/{templates → template_tests}/templatetags/bad_tag.py
  94. 0  tests/{templates → template_tests}/templatetags/broken_tag.py
  95. 0  tests/{templates → template_tests}/templatetags/custom.py
  96. 0  tests/{templates → template_tests}/templatetags/subpackage/__init__.py
  97. 0  tests/{templates → template_tests}/templatetags/subpackage/echo.py
  98. 0  tests/{templates → template_tests}/templatetags/subpackage/echo_invalid.py
  99. +21 −21 tests/{templates → template_tests}/tests.py
  100. 0  tests/{templates → template_tests}/unicode.py
  101. +1 −1  tests/{templates → template_tests}/urls.py
  102. 0  tests/{templates → template_tests}/views.py
  103. 0  tests/{test_templates → templates}/base.html
  104. 0  tests/{test_templates → templates}/comments/comment_notification_email.txt
  105. 0  tests/{test_templates → templates}/custom_admin/add_form.html
  106. 0  tests/{test_templates → templates}/custom_admin/change_form.html
  107. 0  tests/{test_templates → templates}/custom_admin/change_list.html
  108. 0  tests/{test_templates → templates}/custom_admin/delete_confirmation.html
  109. 0  tests/{test_templates → templates}/custom_admin/delete_selected_confirmation.html
  110. 0  tests/{test_templates → templates}/custom_admin/index.html
  111. 0  tests/{test_templates → templates}/custom_admin/login.html
  112. 0  tests/{test_templates → templates}/custom_admin/logout.html
  113. 0  tests/{test_templates → templates}/custom_admin/object_history.html
  114. 0  tests/{test_templates → templates}/custom_admin/password_change_done.html
  115. 0  tests/{test_templates → templates}/custom_admin/password_change_form.html
  116. 0  tests/{test_templates → templates}/extended.html
  117. 0  tests/{test_templates → templates}/form_view.html
  118. 0  tests/{test_templates → templates}/login.html
  119. 0  tests/{test_templates → templates}/views/article_archive_day.html
  120. 0  tests/{test_templates → templates}/views/article_archive_month.html
  121. 0  tests/{test_templates → templates}/views/article_confirm_delete.html
  122. 0  tests/{test_templates → templates}/views/article_detail.html
  123. 0  tests/{test_templates → templates}/views/article_form.html
  124. 0  tests/{test_templates → templates}/views/article_list.html
  125. 0  tests/{test_templates → templates}/views/datearticle_archive_month.html
  126. 0  tests/{test_templates → templates}/views/urlarticle_detail.html
  127. 0  tests/{test_templates → templates}/views/urlarticle_form.html
  128. +2 −2 tests/test_client_regress/tests.py
  129. +13 −13 tests/test_runner/tests.py
  130. +2 −2 tests/test_utils/tests.py
  131. +1 −1  tests/timezones/tests.py
  132. +5 −5 tests/urlpatterns_reverse/erroneous_urls.py
  133. +2 −2 tests/urlpatterns_reverse/extra_urls.py
  134. +1 −1  tests/urlpatterns_reverse/included_named_urls.py
  135. +3 −3 tests/urlpatterns_reverse/included_namespace_urls.py
  136. +1 −1  tests/urlpatterns_reverse/named_urls.py
  137. +7 −7 tests/urlpatterns_reverse/namespace_urls.py
  138. +19 −19 tests/urlpatterns_reverse/tests.py
  139. +2 −2 tests/urlpatterns_reverse/urls.py
  140. +2 −2 tests/urlpatterns_reverse/urls_error_handlers.py
  141. +10 −10 tests/urls.py
  142. 0  tests/{templates/templatetags → utils_tests}/__init__.py
  143. 0  tests/{utils → utils_tests}/archive.py
  144. 0  tests/{utils → utils_tests}/archives/foobar.tar
  145. 0  tests/{utils → utils_tests}/archives/foobar.tar.bz2
  146. 0  tests/{utils → utils_tests}/archives/foobar.tar.gz
  147. 0  tests/{utils → utils_tests}/archives/foobar.zip
  148. 0  tests/{utils → utils_tests}/baseconv.py
  149. 0  tests/{utils → utils_tests}/checksums.py
  150. 0  tests/{utils → utils_tests}/crypto.py
  151. 0  tests/{utils → utils_tests}/datastructures.py
  152. 0  tests/{utils → utils_tests}/dateformat.py
  153. 0  tests/{utils → utils_tests}/dateparse.py
  154. 0  tests/{utils → utils_tests}/datetime_safe.py
  155. 0  tests/{utils → utils_tests}/decorators.py
  156. 0  tests/{utils → utils_tests}/eggs/test_egg.egg
  157. 0  tests/{utils → utils_tests}/encoding.py
  158. 0  tests/{utils → utils_tests}/feedgenerator.py
  159. 0  tests/{utils → utils_tests}/functional.py
  160. 0  tests/{utils → utils_tests}/html.py
  161. 0  tests/{utils → utils_tests}/http.py
  162. 0  tests/{utils → utils_tests}/ipv6.py
  163. 0  tests/{utils → utils_tests}/jslex.py
  164. 0  tests/{utils → utils_tests}/models.py
  165. +10 −10 tests/{utils → utils_tests}/module_loading.py
  166. 0  tests/{utils → utils_tests}/numberformat.py
  167. 0  tests/{utils → utils_tests}/os_utils.py
  168. 0  tests/{utils → utils_tests}/regex_helper.py
  169. 0  tests/{utils → utils_tests}/simplelazyobject.py
  170. 0  tests/{utils → utils_tests}/termcolors.py
  171. 0  tests/{templates → utils_tests/test_module}/__init__.py
  172. 0  tests/{utils → utils_tests}/test_module/bad_module.py
  173. 0  tests/{utils → utils_tests}/test_module/good_module.py
  174. 0  tests/{utils → utils_tests}/test_no_submodule.py
  175. 0  tests/{utils → utils_tests}/tests.py
  176. 0  tests/{utils → utils_tests}/text.py
  177. 0  tests/{utils → utils_tests}/timesince.py
  178. 0  tests/{utils → utils_tests}/timezone.py
  179. 0  tests/{utils → utils_tests}/tzinfo.py
  180. 0  tests/{views → view_tests}/__init__.py
  181. 0  tests/{views/app4 → view_tests/app0}/__init__.py
  182. 0  tests/{views → view_tests}/app0/locale/en/LC_MESSAGES/djangojs.mo
  183. 0  tests/{views → view_tests}/app0/locale/en/LC_MESSAGES/djangojs.po
  184. 0  tests/{views/app3 → view_tests/app1}/__init__.py
  185. 0  tests/{views → view_tests}/app1/locale/fr/LC_MESSAGES/djangojs.mo
  186. 0  tests/{views → view_tests}/app1/locale/fr/LC_MESSAGES/djangojs.po
  187. 0  tests/{views → view_tests}/app2/__init__.py
  188. 0  tests/{views → view_tests}/app2/locale/fr/LC_MESSAGES/djangojs.mo
  189. 0  tests/{views → view_tests}/app2/locale/fr/LC_MESSAGES/djangojs.po
  190. 0  tests/{views/app1 → view_tests/app3}/__init__.py
  191. 0  tests/{views → view_tests}/app3/locale/es_AR/LC_MESSAGES/djangojs.mo
  192. 0  tests/{views → view_tests}/app3/locale/es_AR/LC_MESSAGES/djangojs.po
  193. 0  tests/{views/app0 → view_tests/app4}/__init__.py
  194. 0  tests/{views → view_tests}/app4/locale/es_AR/LC_MESSAGES/djangojs.mo
  195. 0  tests/{views → view_tests}/app4/locale/es_AR/LC_MESSAGES/djangojs.po
  196. +12 −12 tests/{views → view_tests}/fixtures/testdata.json
  197. +3 −3 tests/{views → view_tests}/generic_urls.py
  198. 0  tests/{views → view_tests}/locale/de/LC_MESSAGES/djangojs.mo
  199. 0  tests/{views → view_tests}/locale/de/LC_MESSAGES/djangojs.po
  200. 0  tests/{views → view_tests}/locale/es/LC_MESSAGES/djangojs.mo
  201. 0  tests/{views → view_tests}/locale/es/LC_MESSAGES/djangojs.po
  202. 0  tests/{views → view_tests}/locale/fr/LC_MESSAGES/djangojs.mo
  203. 0  tests/{views → view_tests}/locale/fr/LC_MESSAGES/djangojs.po
  204. 0  tests/{views → view_tests}/locale/ru/LC_MESSAGES/djangojs.mo
  205. 0  tests/{views → view_tests}/locale/ru/LC_MESSAGES/djangojs.po
  206. 0  tests/{views → view_tests}/media/file.txt
  207. 0  tests/{views → view_tests}/media/file.txt.gz
  208. 0  tests/{views → view_tests}/media/file.unknown
  209. 0  tests/{views → view_tests}/models.py
  210. 0  tests/{views → view_tests}/templates/debug/render_test.html
  211. 0  tests/{views → view_tests}/templates/debug/template_exception.html
  212. 0  tests/{views → view_tests}/templates/jsi18n.html
  213. 0  tests/{forms → view_tests/templatetags}/__init__.py
  214. 0  tests/{views → view_tests}/templatetags/debugtags.py
  215. 0  tests/{views → view_tests}/tests/__init__.py
  216. +1 −1  tests/{views → view_tests}/tests/debug.py
  217. 0  tests/{views → view_tests}/tests/defaults.py
  218. +6 −6 tests/{views → view_tests}/tests/i18n.py
  219. +1 −1  tests/{views → view_tests}/tests/shortcuts.py
  220. +1 −1  tests/{views → view_tests}/tests/specials.py
  221. 0  tests/{views → view_tests}/tests/static.py
  222. +6 −6 tests/{views → view_tests}/urls.py
  223. 0  tests/{views → view_tests}/views.py
  224. +6 −6 tests/wsgi/tests.py
View
2  tests/admin_changelist/tests.py
@@ -24,7 +24,7 @@
class ChangeListTests(TestCase):
- urls = "regressiontests.admin_changelist.urls"
+ urls = "admin_changelist.urls"
def setUp(self):
self.factory = RequestFactory()
View
10 tests/admin_inlines/tests.py
@@ -17,7 +17,7 @@
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class TestInline(TestCase):
- urls = "regressiontests.admin_inlines.urls"
+ urls = "admin_inlines.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -196,7 +196,7 @@ def test_create_inlines_on_inherited_model(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class TestInlineMedia(TestCase):
- urls = "regressiontests.admin_inlines.urls"
+ urls = "admin_inlines.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -233,7 +233,7 @@ def test_all_inline_media(self):
self.assertContains(response, 'my_awesome_inline_scripts.js')
class TestInlineAdminForm(TestCase):
- urls = "regressiontests.admin_inlines.urls"
+ urls = "admin_inlines.urls"
def test_immutable_content_type(self):
"""Regression for #9362
@@ -256,7 +256,7 @@ class TestInlinePermissions(TestCase):
inline. Refs #8060.
"""
- urls = "regressiontests.admin_inlines.urls"
+ urls = "admin_inlines.urls"
def setUp(self):
self.user = User(username='admin')
@@ -451,7 +451,7 @@ def test_inline_change_fk_all_perms(self):
class SeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'
fixtures = ['admin-views-users.xml']
- urls = "regressiontests.admin_inlines.urls"
+ urls = "admin_inlines.urls"
def test_add_stackeds(self):
"""
View
135 tests/admin_scripts/tests.py
@@ -25,11 +25,17 @@
from django.utils.six import StringIO
from django.test import LiveServerTestCase
-test_dir = os.path.dirname(os.path.dirname(upath(__file__)))
+
+test_dir = os.path.join(os.environ['DJANGO_TEST_TEMP_DIR'], 'test_project')
+if not os.path.exists(test_dir):
+ os.mkdir(test_dir)
+ open(os.path.join(test_dir, '__init__.py'), 'w').close()
+
+custom_templates_dir = os.path.join(os.path.dirname(__file__), 'custom_templates')
+
class AdminScriptTestCase(unittest.TestCase):
def write_settings(self, filename, apps=None, is_dir=False, sdict=None):
- test_dir = os.path.dirname(os.path.dirname(upath(__file__)))
if is_dir:
settings_dir = os.path.join(test_dir, filename)
os.mkdir(settings_dir)
@@ -38,7 +44,7 @@ def write_settings(self, filename, apps=None, is_dir=False, sdict=None):
settings_file_path = os.path.join(test_dir, filename)
with open(settings_file_path, 'w') as settings_file:
- settings_file.write('# Settings file automatically generated by regressiontests.admin_scripts test case\n')
+ settings_file.write('# Settings file automatically generated by admin_scripts test case\n')
exports = [
'DATABASES',
'ROOT_URLCONF',
@@ -52,7 +58,7 @@ def write_settings(self, filename, apps=None, is_dir=False, sdict=None):
settings_file.write("%s = %s\n" % (s, o))
if apps is None:
- apps = ['django.contrib.auth', 'django.contrib.contenttypes', 'regressiontests.admin_scripts']
+ apps = ['django.contrib.auth', 'django.contrib.contenttypes', 'admin_scripts']
settings_file.write("INSTALLED_APPS = %s\n" % apps)
@@ -91,16 +97,18 @@ def _ext_backend_paths(self):
first_package_re = re.compile(r'(^[^\.]+)\.')
for backend in settings.DATABASES.values():
result = first_package_re.findall(backend['ENGINE'])
- if result and result != 'django':
+ if result and result != ['django']:
backend_pkg = __import__(result[0])
backend_dir = os.path.dirname(backend_pkg.__file__)
paths.append(os.path.dirname(backend_dir))
return paths
def run_test(self, script, args, settings_file=None, apps=None):
- test_dir = os.path.dirname(os.path.dirname(__file__))
- project_dir = os.path.dirname(test_dir)
+ project_dir = test_dir
base_dir = os.path.dirname(project_dir)
+ import django
+ django_dir = os.path.dirname(os.path.dirname(django.__file__))
+ tests_dir = os.path.join(django_dir, 'tests')
ext_backend_base_dirs = self._ext_backend_paths()
# Remember the old environment
@@ -118,7 +126,7 @@ def run_test(self, script, args, settings_file=None, apps=None):
os.environ['DJANGO_SETTINGS_MODULE'] = settings_file
elif 'DJANGO_SETTINGS_MODULE' in os.environ:
del os.environ['DJANGO_SETTINGS_MODULE']
- python_path = [project_dir, base_dir]
+ python_path = [project_dir, base_dir, django_dir, tests_dir]
python_path.extend(ext_backend_base_dirs)
os.environ[python_path_var_name] = os.pathsep.join(python_path)
@@ -127,7 +135,6 @@ def run_test(self, script, args, settings_file=None, apps=None):
out, err = subprocess.Popen([sys.executable, script] + args,
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True).communicate()
-
# Restore the old environment
if old_django_settings_module:
os.environ['DJANGO_SETTINGS_MODULE'] = old_django_settings_module
@@ -158,7 +165,7 @@ def safe_remove(path):
with open(test_manage_py, 'r') as fp:
manage_py_contents = fp.read()
manage_py_contents = manage_py_contents.replace(
- "{{ project_name }}", "regressiontests")
+ "{{ project_name }}", "test_project")
with open(test_manage_py, 'w') as fp:
fp.write(manage_py_contents)
self.addCleanup(safe_remove, test_manage_py)
@@ -230,7 +237,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"default: django-admin builtin commands succeed if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.settings', 'admin_scripts']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -238,7 +245,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"default: django-admin builtin commands succeed if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -265,7 +272,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"default: django-admin can execute user commands if settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.settings']
+ args = ['noargs_command', '--settings=test_project.settings']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -273,7 +280,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"default: django-admin can execute user commands if settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -282,7 +289,7 @@ class DjangoAdminFullPathDefaultSettings(AdminScriptTestCase):
contains the test application specified using a full path.
"""
def setUp(self):
- self.write_settings('settings.py', ['django.contrib.auth', 'django.contrib.contenttypes', 'regressiontests.admin_scripts'])
+ self.write_settings('settings.py', ['django.contrib.auth', 'django.contrib.contenttypes', 'admin_scripts'])
def tearDown(self):
self.remove_settings('settings.py')
@@ -296,7 +303,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"fulldefault: django-admin builtin commands succeed if a settings file is provided"
- args = ['sqlall', '--settings=regressiontests.settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.settings', 'admin_scripts']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -304,7 +311,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"fulldefault: django-admin builtin commands succeed if the environment contains settings"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -331,7 +338,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"fulldefault: django-admin can execute user commands if settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.settings']
+ args = ['noargs_command', '--settings=test_project.settings']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -339,7 +346,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"fulldefault: django-admin can execute user commands if settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -362,7 +369,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"minimal: django-admin builtin commands fail if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.settings', 'admin_scripts']
out, err = self.run_django_admin(args)
self.assertNoOutput(out)
self.assertOutput(err, 'App with label admin_scripts could not be found')
@@ -370,7 +377,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"minimal: django-admin builtin commands fail if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.assertNoOutput(out)
self.assertOutput(err, 'App with label admin_scripts could not be found')
@@ -397,7 +404,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"minimal: django-admin can't execute user commands, even if settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.settings']
+ args = ['noargs_command', '--settings=test_project.settings']
out, err = self.run_django_admin(args)
self.assertNoOutput(out)
self.assertOutput(err, "Unknown command: 'noargs_command'")
@@ -405,7 +412,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"minimal: django-admin can't execute user commands, even if settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.assertNoOutput(out)
self.assertOutput(err, "Unknown command: 'noargs_command'")
@@ -428,7 +435,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"alternate: django-admin builtin commands succeed if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.alternate_settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.alternate_settings', 'admin_scripts']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -436,7 +443,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"alternate: django-admin builtin commands succeed if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_django_admin(args, 'regressiontests.alternate_settings')
+ out, err = self.run_django_admin(args, 'test_project.alternate_settings')
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -463,7 +470,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"alternate: django-admin can execute user commands if settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.alternate_settings']
+ args = ['noargs_command', '--settings=test_project.alternate_settings']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -471,7 +478,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"alternate: django-admin can execute user commands if settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_django_admin(args, 'regressiontests.alternate_settings')
+ out, err = self.run_django_admin(args, 'test_project.alternate_settings')
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -499,7 +506,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"alternate: django-admin builtin commands succeed if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.alternate_settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.alternate_settings', 'admin_scripts']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -507,7 +514,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"alternate: django-admin builtin commands succeed if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_django_admin(args, 'regressiontests.alternate_settings')
+ out, err = self.run_django_admin(args, 'test_project.alternate_settings')
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -533,7 +540,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"alternate: django-admin can execute user commands if settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.alternate_settings']
+ args = ['noargs_command', '--settings=test_project.alternate_settings']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -541,7 +548,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"alternate: django-admin can execute user commands if settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_django_admin(args, 'regressiontests.alternate_settings')
+ out, err = self.run_django_admin(args, 'test_project.alternate_settings')
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -562,17 +569,17 @@ def test_setup_environ(self):
"directory: startapp creates the correct directory"
args = ['startapp', 'settings_test']
app_path = os.path.join(test_dir, 'settings_test')
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.addCleanup(shutil.rmtree, app_path)
self.assertNoOutput(err)
self.assertTrue(os.path.exists(app_path))
def test_setup_environ_custom_template(self):
"directory: startapp creates the correct directory with a custom template"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'app_template')
+ template_path = os.path.join(custom_templates_dir, 'app_template')
args = ['startapp', '--template', template_path, 'custom_settings_test']
app_path = os.path.join(test_dir, 'custom_settings_test')
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.addCleanup(shutil.rmtree, app_path)
self.assertNoOutput(err)
self.assertTrue(os.path.exists(app_path))
@@ -607,7 +614,7 @@ def test_custom_command(self):
def test_builtin_with_settings(self):
"directory: django-admin builtin commands succeed if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.settings', 'admin_scripts']
out, err = self.run_django_admin(args)
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -615,7 +622,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"directory: django-admin builtin commands succeed if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_django_admin(args, 'regressiontests.settings')
+ out, err = self.run_django_admin(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -634,7 +641,7 @@ def test_builtin_command(self):
args = ['sqlall', 'admin_scripts']
out, err = self.run_manage(args)
self.assertNoOutput(out)
- self.assertOutput(err, "Could not import settings 'regressiontests.settings'")
+ self.assertOutput(err, "Could not import settings 'test_project.settings'")
def test_builtin_with_bad_settings(self):
"no settings: manage.py builtin commands fail if settings file (from argument) doesn't exist"
@@ -670,7 +677,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"default: manage.py builtin commands succeed if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.settings', 'admin_scripts']
out, err = self.run_manage(args)
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -678,7 +685,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"default: manage.py builtin commands succeed if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_manage(args, 'regressiontests.settings')
+ out, err = self.run_manage(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -705,7 +712,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"default: manage.py can execute user commands when settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.settings']
+ args = ['noargs_command', '--settings=test_project.settings']
out, err = self.run_manage(args)
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -713,7 +720,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"default: manage.py can execute user commands when settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_manage(args, 'regressiontests.settings')
+ out, err = self.run_manage(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -723,7 +730,7 @@ class ManageFullPathDefaultSettings(AdminScriptTestCase):
contains the test application specified using a full path.
"""
def setUp(self):
- self.write_settings('settings.py', ['django.contrib.auth', 'django.contrib.contenttypes', 'regressiontests.admin_scripts'])
+ self.write_settings('settings.py', ['django.contrib.auth', 'django.contrib.contenttypes', 'admin_scripts'])
def tearDown(self):
self.remove_settings('settings.py')
@@ -737,7 +744,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"fulldefault: manage.py builtin commands succeed if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.settings', 'admin_scripts']
out, err = self.run_manage(args)
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -745,7 +752,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"fulldefault: manage.py builtin commands succeed if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_manage(args, 'regressiontests.settings')
+ out, err = self.run_manage(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, 'CREATE TABLE')
@@ -772,7 +779,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"fulldefault: manage.py can execute user commands when settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.settings']
+ args = ['noargs_command', '--settings=test_project.settings']
out, err = self.run_manage(args)
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -780,7 +787,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"fulldefault: manage.py can execute user commands when settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_manage(args, 'regressiontests.settings')
+ out, err = self.run_manage(args, 'test_project.settings')
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:NoArgsCommand")
@@ -803,7 +810,7 @@ def test_builtin_command(self):
def test_builtin_with_settings(self):
"minimal: manage.py builtin commands fail if settings are provided as argument"
- args = ['sqlall', '--settings=regressiontests.settings', 'admin_scripts']
+ args = ['sqlall', '--settings=test_project.settings', 'admin_scripts']
out, err = self.run_manage(args)
self.assertNoOutput(out)
self.assertOutput(err, 'App with label admin_scripts could not be found')
@@ -811,7 +818,7 @@ def test_builtin_with_settings(self):
def test_builtin_with_environment(self):
"minimal: manage.py builtin commands fail if settings are provided in the environment"
args = ['sqlall', 'admin_scripts']
- out, err = self.run_manage(args, 'regressiontests.settings')
+ out, err = self.run_manage(args, 'test_project.settings')
self.assertNoOutput(out)
self.assertOutput(err, 'App with label admin_scripts could not be found')
@@ -838,7 +845,7 @@ def test_custom_command(self):
def test_custom_command_with_settings(self):
"minimal: manage.py can't execute user commands, even if settings are provided as argument"
- args = ['noargs_command', '--settings=regressiontests.settings']
+ args = ['noargs_command', '--settings=test_project.settings']
out, err = self.run_manage(args)
self.assertNoOutput(out)
self.assertOutput(err, "Unknown command: 'noargs_command'")
@@ -846,7 +853,7 @@ def test_custom_command_with_settings(self):
def test_custom_command_with_environment(self):
"minimal: manage.py can't execute user commands, even if settings are provided in environment"
args = ['noargs_command']
- out, err = self.run_manage(args, 'regressiontests.settings')
+ out, err = self.run_manage(args, 'test_project.settings')
self.assertNoOutput(out)
self.assertOutput(err, "Unknown command: 'noargs_command'")
@@ -865,7 +872,7 @@ def test_builtin_command(self):
args = ['sqlall', 'admin_scripts']
out, err = self.run_manage(args)
self.assertNoOutput(out)
- self.assertOutput(err, "Could not import settings 'regressiontests.settings'")
+ self.assertOutput(err, "Could not import settings 'test_project.settings'")
def test_builtin_with_settings(self):
"alternate: manage.py builtin commands work with settings provided as argument"
@@ -904,7 +911,7 @@ def test_custom_command(self):
args = ['noargs_command']
out, err = self.run_manage(args)
self.assertNoOutput(out)
- self.assertOutput(err, "Could not import settings 'regressiontests.settings'")
+ self.assertOutput(err, "Could not import settings 'test_project.settings'")
def test_custom_command_with_settings(self):
"alternate: manage.py can execute user commands if settings are provided as argument"
@@ -1007,7 +1014,7 @@ def write_settings_with_import_error(self, filename, apps=None, is_dir=False, sd
else:
settings_file_path = os.path.join(test_dir, filename)
with open(settings_file_path, 'w') as settings_file:
- settings_file.write('# Settings file automatically generated by regressiontests.admin_scripts test case\n')
+ settings_file.write('# Settings file automatically generated by admin_scripts test case\n')
settings_file.write('# The next line will cause an import error:\nimport foo42bar\n')
def test_builtin_command(self):
@@ -1104,13 +1111,13 @@ def test_liveserver(self):
address_predefined = 'DJANGO_LIVE_TEST_SERVER_ADDRESS' in os.environ
old_address = os.environ.get('DJANGO_LIVE_TEST_SERVER_ADDRESS')
- self.cmd.handle(verbosity=0, testrunner='regressiontests.admin_scripts.tests.CustomTestRunner')
+ self.cmd.handle(verbosity=0, testrunner='admin_scripts.tests.CustomTestRunner')
# Original state hasn't changed
self.assertEqual('DJANGO_LIVE_TEST_SERVER_ADDRESS' in os.environ, address_predefined)
self.assertEqual(os.environ.get('DJANGO_LIVE_TEST_SERVER_ADDRESS'), old_address)
- self.cmd.handle(verbosity=0, testrunner='regressiontests.admin_scripts.tests.CustomTestRunner',
+ self.cmd.handle(verbosity=0, testrunner='admin_scripts.tests.CustomTestRunner',
liveserver='blah')
# Variable was correctly set
@@ -1485,7 +1492,7 @@ def test_simple_project_different_directory(self):
def test_custom_project_template(self):
"Make sure the startproject management command is able to use a different project template"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template')
+ template_path = os.path.join(custom_templates_dir, 'project_template')
args = ['startproject', '--template', template_path, 'customtestproject']
testproject_dir = os.path.join(test_dir, 'customtestproject')
self.addCleanup(shutil.rmtree, testproject_dir, True)
@@ -1497,7 +1504,7 @@ def test_custom_project_template(self):
def test_template_dir_with_trailing_slash(self):
"Ticket 17475: Template dir passed has a trailing path separator"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template' + os.sep)
+ template_path = os.path.join(custom_templates_dir, 'project_template' + os.sep)
args = ['startproject', '--template', template_path, 'customtestproject']
testproject_dir = os.path.join(test_dir, 'customtestproject')
self.addCleanup(shutil.rmtree, testproject_dir, True)
@@ -1509,7 +1516,7 @@ def test_template_dir_with_trailing_slash(self):
def test_custom_project_template_from_tarball_by_path(self):
"Make sure the startproject management command is able to use a different project template from a tarball"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template.tgz')
+ template_path = os.path.join(custom_templates_dir, 'project_template.tgz')
args = ['startproject', '--template', template_path, 'tarballtestproject']
testproject_dir = os.path.join(test_dir, 'tarballtestproject')
self.addCleanup(shutil.rmtree, testproject_dir, True)
@@ -1521,7 +1528,7 @@ def test_custom_project_template_from_tarball_by_path(self):
def test_custom_project_template_from_tarball_to_alternative_location(self):
"Startproject can use a project template from a tarball and create it in a specified location"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template.tgz')
+ template_path = os.path.join(custom_templates_dir, 'project_template.tgz')
args = ['startproject', '--template', template_path, 'tarballtestproject', 'altlocation']
testproject_dir = os.path.join(test_dir, 'altlocation')
os.mkdir(testproject_dir)
@@ -1560,7 +1567,7 @@ def test_project_template_tarball_url(self):
def test_file_without_extension(self):
"Make sure the startproject management command is able to render custom files"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template')
+ template_path = os.path.join(custom_templates_dir, 'project_template')
args = ['startproject', '--template', template_path, 'customtestproject', '-e', 'txt', '-n', 'Procfile']
testproject_dir = os.path.join(test_dir, 'customtestproject')
self.addCleanup(shutil.rmtree, testproject_dir, True)
@@ -1578,7 +1585,7 @@ def test_file_without_extension(self):
def test_custom_project_template_context_variables(self):
"Make sure template context variables are rendered with proper values"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template')
+ template_path = os.path.join(custom_templates_dir, 'project_template')
args = ['startproject', '--template', template_path, 'another_project', 'project_dir']
testproject_dir = os.path.join(test_dir, 'project_dir')
os.mkdir(testproject_dir)
@@ -1596,7 +1603,7 @@ def test_no_escaping_of_project_variables(self):
# We're using a custom command so we need the alternate settings
self.write_settings('alternate_settings.py')
self.addCleanup(self.remove_settings, 'alternate_settings.py')
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template')
+ template_path = os.path.join(custom_templates_dir, 'project_template')
args = ['custom_startproject', '--template', template_path, 'another_project', 'project_dir', '--extra', '<&>', '--settings=alternate_settings']
testproject_dir = os.path.join(test_dir, 'project_dir')
os.mkdir(testproject_dir)
@@ -1613,7 +1620,7 @@ def test_custom_project_destination_missing(self):
Make sure an exception is raised when the provided
destination directory doesn't exist
"""
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template')
+ template_path = os.path.join(custom_templates_dir, 'project_template')
args = ['startproject', '--template', template_path, 'yet_another_project', 'project_dir2']
testproject_dir = os.path.join(test_dir, 'project_dir2')
out, err = self.run_django_admin(args)
@@ -1623,7 +1630,7 @@ def test_custom_project_destination_missing(self):
def test_custom_project_template_with_non_ascii_templates(self):
"Ticket 18091: Make sure the startproject management command is able to render templates with non-ASCII content"
- template_path = os.path.join(test_dir, 'admin_scripts', 'custom_templates', 'project_template')
+ template_path = os.path.join(custom_templates_dir, 'project_template')
args = ['startproject', '--template', template_path, '--extension=txt', 'customtestproject']
testproject_dir = os.path.join(test_dir, 'customtestproject')
self.addCleanup(shutil.rmtree, testproject_dir, True)
View
2  tests/admin_validation/tests.py
@@ -142,7 +142,7 @@ class TwoAlbumFKAndAnEInline(admin.TabularInline):
model = TwoAlbumFKAndAnE
self.assertRaisesMessage(Exception,
- "<class 'regressiontests.admin_validation.models.TwoAlbumFKAndAnE'> has more than 1 ForeignKey to <class 'regressiontests.admin_validation.models.Album'>",
+ "<class 'admin_validation.models.TwoAlbumFKAndAnE'> has more than 1 ForeignKey to <class 'admin_validation.models.Album'>",
validate_inline,
TwoAlbumFKAndAnEInline, None, Album)
View
68 tests/admin_views/tests.py
@@ -64,7 +64,7 @@ class AdminViewBasicTest(TestCase):
# this test case and changing urlbit.
urlbit = 'admin'
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
def setUp(self):
self.old_USE_I18N = settings.USE_I18N
@@ -610,7 +610,7 @@ def test_allows_attributeerror_to_bubble_up(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminViewFormUrlTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ["admin-views-users.xml"]
urlbit = "admin3"
@@ -644,7 +644,7 @@ def test_filter_with_custom_template(self):
class AdminJavaScriptTest(TestCase):
fixtures = ['admin-views-users.xml']
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
def setUp(self):
self.client.login(username='super', password='secret')
@@ -709,7 +709,7 @@ def test_js_minified_only_if_debug_is_false(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class SaveAsTests(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml', 'admin-views-person.xml']
def setUp(self):
@@ -739,7 +739,7 @@ def test_save_as_display(self):
class CustomModelAdminTest(AdminViewBasicTest):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
urlbit = "admin2"
def testCustomAdminSiteLoginForm(self):
@@ -816,7 +816,7 @@ def get_perm(Model, perm):
class AdminViewPermissionsTest(TestCase):
"""Tests for Admin Views Permissions."""
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -1257,7 +1257,7 @@ def testDisabledPermissionsWhenLoggedIn(self):
class AdminViewsNoUrlTest(TestCase):
"""Regression test for #17333"""
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -1287,7 +1287,7 @@ def test_no_standard_modeladmin_urls(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminViewDeletedObjectsTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml', 'deleted-objects.xml']
def setUp(self):
@@ -1405,7 +1405,7 @@ def test_generic_relations(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminViewStringPrimaryKeyTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml', 'string-primary-key.xml']
def __init__(self, *args):
@@ -1526,7 +1526,7 @@ def test_change_view_history_link(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class SecureViewTests(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -1686,7 +1686,7 @@ def test_shortcut_view_only_available_to_staff(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminViewUnicodeTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-unicode.xml']
def setUp(self):
@@ -1741,7 +1741,7 @@ def testUnicodeDelete(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminViewListEditable(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml', 'admin-views-person.xml']
def setUp(self):
@@ -2118,7 +2118,7 @@ def test_pk_hidden_fields_with_list_display_links(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminSearchTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users', 'multiple-child-classes',
'admin-views-person']
@@ -2166,7 +2166,7 @@ def test_beginning_matches(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminInheritedInlinesTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -2254,7 +2254,7 @@ def testInline(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminActionsTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml', 'admin-views-actions.xml']
def setUp(self):
@@ -2473,7 +2473,7 @@ def test_popup_actions(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class TestCustomChangeList(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
urlbit = 'admin'
@@ -2502,7 +2502,7 @@ def test_custom_changelist(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class TestInlineNotEditable(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -2522,7 +2522,7 @@ def test(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminCustomQuerysetTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -2748,7 +2748,7 @@ def test_edit_model_modeladmin_only_qs(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminInlineFileUploadTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml', 'admin-views-actions.xml']
urlbit = 'admin'
@@ -2795,7 +2795,7 @@ def test_inline_file_upload_edit_validation_error_post(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminInlineTests(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3114,7 +3114,7 @@ def test_ordered_inline(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class NeverCacheTests(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml', 'admin-views-colors.xml', 'admin-views-fabrics.xml']
def setUp(self):
@@ -3188,7 +3188,7 @@ def testJsi18n(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class PrePopulatedTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3225,7 +3225,7 @@ def test_prepopulated_maxlength_localized(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class SeleniumAdminViewsFirefoxTests(AdminSeleniumWebDriverTestCase):
webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def test_prepopulated_fields(self):
@@ -3356,7 +3356,7 @@ class SeleniumAdminViewsIETests(SeleniumAdminViewsFirefoxTests):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class ReadonlyTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3444,7 +3444,7 @@ def test_change_form_renders_correct_null_choice_value(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class RawIdFieldsTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3482,7 +3482,7 @@ class UserAdminTest(TestCase):
"""
Tests user CRUD functionality.
"""
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3583,7 +3583,7 @@ class GroupAdminTest(TestCase):
"""
Tests group CRUD functionality.
"""
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3612,7 +3612,7 @@ def test_group_permission_performance(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class CSSTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3668,7 +3668,7 @@ def test_index_css_classes(self):
@unittest.skipUnless(docutils, "no docutils installed.")
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminDocsTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3711,7 +3711,7 @@ def test_filters(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class ValidXHTMLTests(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
urlbit = 'admin'
@@ -3735,7 +3735,7 @@ def testLangNamePresent(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class DateHierarchyTests(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3867,7 +3867,7 @@ class AdminCustomSaveRelatedTests(TestCase):
Ensure that one can easily customize the way related objects are saved.
Refs #16115.
"""
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3932,7 +3932,7 @@ def test_should_be_able_to_edit_related_objects_on_changelist_view(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminViewLogoutTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
@@ -3961,7 +3961,7 @@ def test_client_logout_url_can_be_used_to_login(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class AdminUserMessageTest(TestCase):
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
fixtures = ['admin-views-users.xml']
def setUp(self):
View
4 tests/admin_widgets/tests.py
@@ -460,7 +460,7 @@ def test_no_can_add_related(self):
class DateTimePickerSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'
fixtures = ['admin-widgets-users.xml']
- urls = "regressiontests.admin_widgets.urls"
+ urls = "admin_widgets.urls"
def test_show_hide_date_time_picker_widgets(self):
"""
@@ -516,7 +516,7 @@ class DateTimePickerSeleniumIETests(DateTimePickerSeleniumFirefoxTests):
class HorizontalVerticalFilterSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'
fixtures = ['admin-widgets-users.xml']
- urls = "regressiontests.admin_widgets.urls"
+ urls = "admin_widgets.urls"
def setUp(self):
self.lisa = models.Student.objects.create(name='Lisa')
View
14 tests/cache/tests.py
@@ -809,7 +809,7 @@ def setUp(self):
self.prefix_cache = get_cache(self.backend_name, LOCATION=self._table_name, KEY_PREFIX='cacheprefix')
self.v2_cache = get_cache(self.backend_name, LOCATION=self._table_name, VERSION=2)
self.custom_key_cache = get_cache(self.backend_name, LOCATION=self._table_name, KEY_FUNCTION=custom_key_func)
- self.custom_key_cache2 = get_cache(self.backend_name, LOCATION=self._table_name, KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
+ self.custom_key_cache2 = get_cache(self.backend_name, LOCATION=self._table_name, KEY_FUNCTION='cache.tests.custom_key_func')
def tearDown(self):
from django.db import connection
@@ -897,7 +897,7 @@ def setUp(self):
self.prefix_cache = get_cache(self.backend_name, KEY_PREFIX='cacheprefix')
self.v2_cache = get_cache(self.backend_name, VERSION=2)
self.custom_key_cache = get_cache(self.backend_name, OPTIONS={'MAX_ENTRIES': 30}, KEY_FUNCTION=custom_key_func)
- self.custom_key_cache2 = get_cache(self.backend_name, OPTIONS={'MAX_ENTRIES': 30}, KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
+ self.custom_key_cache2 = get_cache(self.backend_name, OPTIONS={'MAX_ENTRIES': 30}, KEY_FUNCTION='cache.tests.custom_key_func')
# LocMem requires a hack to make the other caches
# share a data store with the 'normal' cache.
@@ -966,7 +966,7 @@ def setUp(self):
self.prefix_cache = get_cache(cache_key, KEY_PREFIX=random_prefix)
self.v2_cache = get_cache(cache_key, VERSION=2)
self.custom_key_cache = get_cache(cache_key, KEY_FUNCTION=custom_key_func)
- self.custom_key_cache2 = get_cache(cache_key, KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
+ self.custom_key_cache2 = get_cache(cache_key, KEY_FUNCTION='cache.tests.custom_key_func')
def tearDown(self):
self.cache.clear()
@@ -1011,7 +1011,7 @@ def setUp(self):
self.prefix_cache = get_cache(self.backend_name, LOCATION=self.dirname, KEY_PREFIX='cacheprefix')
self.v2_cache = get_cache(self.backend_name, LOCATION=self.dirname, VERSION=2)
self.custom_key_cache = get_cache(self.backend_name, LOCATION=self.dirname, KEY_FUNCTION=custom_key_func)
- self.custom_key_cache2 = get_cache(self.backend_name, LOCATION=self.dirname, KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
+ self.custom_key_cache2 = get_cache(self.backend_name, LOCATION=self.dirname, KEY_FUNCTION='cache.tests.custom_key_func')
def tearDown(self):
self.cache.clear()
@@ -1055,7 +1055,7 @@ class CustomCacheKeyValidationTests(unittest.TestCase):
"""
def test_custom_key_validation(self):
- cache = get_cache('regressiontests.cache.liberal_backend://')
+ cache = get_cache('cache.liberal_backend://')
# this key is both longer than 250 characters, and has spaces
key = 'some key with spaces' * 15
@@ -1082,7 +1082,7 @@ def test_simple(self):
def test_close(self):
from django.core import signals
- cache = get_cache('regressiontests.cache.closeable_cache.CacheClass')
+ cache = get_cache('cache.closeable_cache.CacheClass')
self.assertFalse(cache.closed)
signals.request_finished.send(self.__class__)
self.assertTrue(cache.closed)
@@ -1865,7 +1865,7 @@ def test_with_etag(self):
class TestEtagWithAdmin(TestCase):
# See https://code.djangoproject.com/ticket/16003
- urls = "regressiontests.admin_views.urls"
+ urls = "admin_views.urls"
def test_admin(self):
with self.settings(USE_ETAGS=False):
View
2  tests/commands_sql/tests.py
@@ -7,7 +7,7 @@
from django.test import TestCase
from django.utils import six
-# See also regressiontests/initial_sql_regress for 'custom_sql_for_model' tests
+# See also initial_sql_regress for 'custom_sql_for_model' tests
class SQLCommandsTestCase(TestCase):
View
14 tests/comment_tests/custom_comments/__init__.py
@@ -1,32 +1,32 @@
from django.core import urlresolvers
-from regressiontests.comment_tests.custom_comments.models import CustomComment
-from regressiontests.comment_tests.custom_comments.forms import CustomCommentForm
+from comment_tests.custom_comments.models import CustomComment
+from comment_tests.custom_comments.forms import CustomCommentForm
def get_model():
- return CustomComment
+ return CustomComment
def get_form():
return CustomCommentForm
def get_form_target():
return urlresolvers.reverse(
- "regressiontests.comment_tests.custom_comments.views.custom_submit_comment"
+ "comment_tests.custom_comments.views.custom_submit_comment"
)
def get_flag_url(c):
return urlresolvers.reverse(
- "regressiontests.comment_tests.custom_comments.views.custom_flag_comment",
+ "comment_tests.custom_comments.views.custom_flag_comment",
args=(c.id,)
)
def get_delete_url(c):
return urlresolvers.reverse(
- "regressiontests.comment_tests.custom_comments.views.custom_delete_comment",
+ "comment_tests.custom_comments.views.custom_delete_comment",
args=(c.id,)
)
def get_approve_url(c):
return urlresolvers.reverse(
- "regressiontests.comment_tests.custom_comments.views.custom_approve_comment",
+ "comment_tests.custom_comments.views.custom_approve_comment",
args=(c.id,)
)
View
18 tests/comment_tests/tests/__init__.py
@@ -17,7 +17,7 @@
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',))
class CommentTestCase(TestCase):
fixtures = ["comment_tests"]
- urls = 'regressiontests.comment_tests.urls_default'
+ urls = 'comment_tests.urls_default'
def createSomeComments(self):
# Two anonymous comments on two different objects
@@ -85,11 +85,11 @@ def getValidData(self, obj):
d.update(f.initial)
return d
-from regressiontests.comment_tests.tests.app_api_tests import *
-from regressiontests.comment_tests.tests.feed_tests import *
-from regressiontests.comment_tests.tests.model_tests import *
-from regressiontests.comment_tests.tests.comment_form_tests import *
-from regressiontests.comment_tests.tests.templatetag_tests import *
-from regressiontests.comment_tests.tests.comment_view_tests import *
-from regressiontests.comment_tests.tests.moderation_view_tests import *
-from regressiontests.comment_tests.tests.comment_utils_moderators_tests import *
+from comment_tests.tests.app_api_tests import *
+from comment_tests.tests.feed_tests import *
+from comment_tests.tests.model_tests import *
+from comment_tests.tests.comment_form_tests import *
+from comment_tests.tests.templatetag_tests import *
+from comment_tests.tests.comment_view_tests import *
+from comment_tests.tests.moderation_view_tests import *
+from comment_tests.tests.comment_utils_moderators_tests import *
View
12 tests/comment_tests/tests/app_api_tests.py
@@ -45,23 +45,23 @@ def getGetApproveURL(self):
@override_settings(
- COMMENTS_APP='regressiontests.comment_tests.custom_comments',
+ COMMENTS_APP='comment_tests.custom_comments',
INSTALLED_APPS=list(settings.INSTALLED_APPS) + [
- 'regressiontests.comment_tests.custom_comments'],
+ 'comment_tests.custom_comments'],
)
class CustomCommentTest(CommentTestCase):
- urls = 'regressiontests.comment_tests.urls'
+ urls = 'comment_tests.urls'
def testGetCommentApp(self):
- from regressiontests.comment_tests import custom_comments
+ from comment_tests import custom_comments
self.assertEqual(comments.get_comment_app(), custom_comments)
def testGetModel(self):
- from regressiontests.comment_tests.custom_comments.models import CustomComment
+ from comment_tests.custom_comments.models import CustomComment
self.assertEqual(comments.get_model(), CustomComment)
def testGetForm(self):
- from regressiontests.comment_tests.custom_comments.forms import CustomCommentForm
+ from comment_tests.custom_comments.forms import CustomCommentForm
self.assertEqual(comments.get_form(), CustomCommentForm)
def testGetFormTarget(self):
View
2  tests/comment_tests/tests/feed_tests.py
@@ -12,7 +12,7 @@
class CommentFeedTests(CommentTestCase):
- urls = 'regressiontests.comment_tests.urls'
+ urls = 'comment_tests.urls'
feed_url = '/rss/comments/'
def setUp(self):
View
2  tests/comment_tests/tests/moderation_view_tests.py
@@ -252,7 +252,7 @@ def testApprovedView(self):
self.assertTemplateUsed(response, "comments/approved.html")
class AdminActionsTests(CommentTestCase):
- urls = "regressiontests.comment_tests.urls_admin"
+ urls = "comment_tests.urls_admin"
def setUp(self):
super(AdminActionsTests, self).setUp()
View
2  tests/conditional_processing/models.py
@@ -16,7 +16,7 @@
EXPIRED_ETAG = '7fae4cd4b0f81e7d2914700043aa8ed6'
class ConditionalGet(TestCase):
- urls = 'regressiontests.conditional_processing.urls'
+ urls = 'conditional_processing.urls'
def assertFullResponse(self, response, check_last_modified=True, check_etag=True):
self.assertEqual(response.status_code, 200)
View
2  tests/context_processors/tests.py
@@ -9,7 +9,7 @@ class RequestContextProcessorTests(TestCase):
Tests for the ``django.core.context_processors.request`` processor.
"""
- urls = 'regressiontests.context_processors.urls'
+ urls = 'context_processors.urls'
def test_request_attributes(self):
"""
View
2  tests/empty/no_models/tests.py
@@ -2,5 +2,5 @@
class NoModelTests(TestCase):
- """ A placeholder test case. See modeltests.empty.tests for more info. """
+ """ A placeholder test case. See empty.tests for more info. """
pass
View
2  tests/empty/tests.py
@@ -31,7 +31,7 @@ class NoModelTests(TestCase):
It seemed like an appropriate home for it.
"""
- @override_settings(INSTALLED_APPS=("modeltests.empty.no_models",))
+ @override_settings(INSTALLED_APPS=("empty.no_models",))
def test_no_models(self):
with six.assertRaisesRegex(self, ImproperlyConfigured,
'App with label no_models is missing a models.py module.'):
View
2  tests/file_storage/tests.py
@@ -27,7 +27,7 @@
from django.utils import unittest
from django.utils._os import upath
from django.test.utils import override_settings
-from ..servers.tests import LiveServerBase
+from servers.tests import LiveServerBase
# Try to import PIL in either of the two ways it can end up installed.
# Checking for the existence of Image is enough for CPython, but
View
0  tests/views/templatetags/__init__.py → tests/forms_tests/__init__.py
File renamed without changes
View
0  tests/forms/models.py → tests/forms_tests/models.py
File renamed without changes
View
0  tests/forms/templates/forms/article_form.html → tests/forms_tests/templates/forms/article_form.html
File renamed without changes
View
0  tests/forms/tests/__init__.py → tests/forms_tests/tests/__init__.py
File renamed without changes
View
2  tests/forms/tests/error_messages.py → tests/forms_tests/tests/error_messages.py
@@ -237,7 +237,7 @@ def as_divs(self):
class ModelChoiceFieldErrorMessagesTestCase(TestCase, AssertFormErrorsMixin):
def test_modelchoicefield(self):
# Create choices for the model choice field tests below.
- from regressiontests.forms.models import ChoiceModel
+ from forms_tests.models import ChoiceModel
c1 = ChoiceModel.objects.create(pk=1, name='a')
c2 = ChoiceModel.objects.create(pk=2, name='b')
c3 = ChoiceModel.objects.create(pk=3, name='c')
View
0  tests/forms/tests/extra.py → tests/forms_tests/tests/extra.py
File renamed without changes
View
12 tests/forms/tests/fields.py → tests/forms_tests/tests/fields.py
@@ -577,7 +577,7 @@ def test_change_regex_after_init(self):
self.assertRaisesMessage(ValidationError, "'Enter a valid value.'", f.clean, 'abcd')
# EmailField ##################################################################
- # See also modeltests/validators tests for validate_email specific tests
+ # See also validators tests for validate_email specific tests
def test_emailfield_1(self):
f = EmailField()
@@ -1131,7 +1131,7 @@ def test_filepathfield_folders(self):
f = FilePathField(path=path, allow_folders=True, allow_files=False)
f.choices.sort()
expected = [
- ('/tests/regressiontests/forms/tests/filepath_test_files/directory', 'directory'),
+ ('/tests/forms_tests/tests/filepath_test_files/directory', 'directory'),
]
for exp, got in zip(expected, fix_os_paths(f.choices)):
self.assertEqual(exp[1], got[1])
@@ -1140,10 +1140,10 @@ def test_filepathfield_folders(self):
f = FilePathField(path=path, allow_folders=True, allow_files=True)
f.choices.sort()
expected = [
- ('/tests/regressiontests/forms/tests/filepath_test_files/.dot-file', '.dot-file'),
- ('/tests/regressiontests/forms/tests/filepath_test_files/directory', 'directory'),
- ('/tests/regressiontests/forms/tests/filepath_test_files/fake-image.jpg', 'fake-image.jpg'),
- ('/tests/regressiontests/forms/tests/filepath_test_files/real-text-file.txt', 'real-text-file.txt'),
+ ('/tests/forms_tests/tests/filepath_test_files/.dot-file', '.dot-file'),
+ ('/tests/forms_tests/tests/filepath_test_files/directory', 'directory'),
+ ('/tests/forms_tests/tests/filepath_test_files/fake-image.jpg', 'fake-image.jpg'),
+ ('/tests/forms_tests/tests/filepath_test_files/real-text-file.txt', 'real-text-file.txt'),
]
actual = fix_os_paths(f.choices)
View
0  tests/forms/tests/filepath_test_files/.dot-file → ...s/forms_tests/tests/filepath_test_files/.dot-file
File renamed without changes
View
0  ...s/forms/tests/filepath_test_files/directory/.keep → ...s_tests/tests/filepath_test_files/directory/.keep
File renamed without changes
View
0  tests/forms/tests/filepath_test_files/fake-image.jpg → ...ms_tests/tests/filepath_test_files/fake-image.jpg
File renamed without changes
View
0  ...orms/tests/filepath_test_files/real-text-file.txt → ...ests/tests/filepath_test_files/real-text-file.txt
File renamed without changes
View
0  tests/forms/tests/forms.py → tests/forms_tests/tests/forms.py
File renamed without changes
View
0  tests/forms/tests/formsets.py → tests/forms_tests/tests/formsets.py
File renamed without changes
View
0  tests/forms/tests/input_formats.py → tests/forms_tests/tests/input_formats.py
File renamed without changes
View
0  tests/forms/tests/media.py → tests/forms_tests/tests/media.py
File renamed without changes
View
0  tests/forms/tests/models.py → tests/forms_tests/tests/models.py
File renamed without changes
View
4 tests/forms/tests/regressions.py → tests/forms_tests/tests/regressions.py
@@ -7,7 +7,7 @@
from django.test import TestCase
from django.utils.translation import ugettext_lazy, override
-from regressiontests.forms.models import Cheese
+from forms_tests.models import Cheese
class FormsRegressionsTestCase(TestCase):
@@ -121,7 +121,7 @@ class SomeForm(Form):
f = SomeForm({'field': ['<script>']})
self.assertHTMLEqual(t.render(Context({'form': f})), '<ul class="errorlist"><li>field<ul class="errorlist"><li>Select a valid choice. &lt;script&gt; is not one of the available choices.</li></ul></li></ul>')
- from regressiontests.forms.models import ChoiceModel
+ from forms_tests.models import ChoiceModel
class SomeForm(Form):
field = ModelMultipleChoiceField(ChoiceModel.objects.all())
View
0  tests/forms/tests/util.py → tests/forms_tests/tests/util.py
File renamed without changes
View
0  tests/forms/tests/validators.py → tests/forms_tests/tests/validators.py
File renamed without changes
View
2  tests/forms/tests/widgets.py → tests/forms_tests/tests/widgets.py
@@ -1012,7 +1012,7 @@ class SplitDateRequiredForm(Form):
class LiveWidgetTests(AdminSeleniumWebDriverTestCase):
- urls = 'regressiontests.forms.urls'
+ urls = 'forms_tests.urls'
def test_textarea_trailing_newlines(self):
"""
View
2  tests/forms/urls.py → tests/forms_tests/urls.py
@@ -5,5 +5,5 @@
urlpatterns = patterns('',
- url(r'^/model_form/(?P<pk>\d+)/$', ArticleFormView.as_view(), name="article_form"),
+ url(r'^model_form/(?P<pk>\d+)/$', ArticleFormView.as_view(), name="article_form"),
)
View
0  tests/forms/views.py → tests/forms_tests/views.py
File renamed without changes
View
10 tests/generic_inline_admin/tests.py
@@ -19,7 +19,7 @@
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class GenericAdminViewTest(TestCase):
- urls = "regressiontests.generic_inline_admin.urls"
+ urls = "generic_inline_admin.urls"
fixtures = ['users.xml']
def setUp(self):
@@ -132,7 +132,7 @@ def testGenericInlineFormsetFactory(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class GenericInlineAdminParametersTest(TestCase):
- urls = "regressiontests.generic_inline_admin.urls"
+ urls = "generic_inline_admin.urls"
fixtures = ['users.xml']
def setUp(self):
@@ -186,7 +186,7 @@ def testMaxNumParam(self):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class GenericInlineAdminWithUniqueTogetherTest(TestCase):
- urls = "regressiontests.generic_inline_admin.urls"
+ urls = "generic_inline_admin.urls"
fixtures = ['users.xml']
def setUp(self):
@@ -213,7 +213,7 @@ def testAdd(self):
self.assertEqual(response.status_code, 302) # redirect somewhere
class NoInlineDeletionTest(TestCase):
- urls = "regressiontests.generic_inline_admin.urls"
+ urls = "generic_inline_admin.urls"
def test_no_deletion(self):
fake_site = object()
@@ -235,7 +235,7 @@ def has_perm(self, perm):
class GenericInlineModelAdminTest(TestCase):
- urls = "regressiontests.generic_inline_admin.urls"
+ urls = "generic_inline_admin.urls"
def setUp(self):
self.site = AdminSite()
View
2  tests/generic_views/base.py
@@ -229,7 +229,7 @@ def test_args_kwargs_request_on_self(self):
class TemplateViewTest(TestCase):
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
rf = RequestFactory()
View
12 tests/generic_views/dates.py
@@ -33,7 +33,7 @@ def _make_books(n, base_date):
class ArchiveIndexViewTests(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_archive_view(self):
@@ -136,7 +136,7 @@ def test_date_list_order(self):
class YearArchiveViewTests(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_year_view(self):
res = self.client.get('/dates/books/2008/')
@@ -221,7 +221,7 @@ def test_date_list_order(self):
class MonthArchiveViewTests(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_month_view(self):
res = self.client.get('/dates/books/2008/oct/')
@@ -348,7 +348,7 @@ def test_date_list_order(self):
class WeekArchiveViewTests(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_week_view(self):
res = self.client.get('/dates/books/2008/week/39/')
@@ -445,7 +445,7 @@ def test_aware_datetime_week_view(self):
class DayArchiveViewTests(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_day_view(self):
res = self.client.get('/dates/books/2008/oct/01/')
@@ -563,7 +563,7 @@ def test_aware_datetime_day_view(self):
class DateDetailViewTests(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_date_detail_by_pk(self):
res = self.client.get('/dates/books/2008/oct/01/1/')
View
2  tests/generic_views/detail.py
@@ -9,7 +9,7 @@
class DetailViewTest(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_simple_object(self):
res = self.client.get('/detail/obj/')
View
8 tests/generic_views/edit.py
@@ -22,7 +22,7 @@ def test_initial_data(self):
class BasicFormTests(TestCase):
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_post_data(self):
res = self.client.post('/contact/', {'name': "Me", 'message': "Hello"})
@@ -35,7 +35,7 @@ def test_get_form(self):
self.assertEqual(form_class._meta.model, Author)
class CreateViewTests(TestCase):
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_create(self):
res = self.client.get('/edit/authors/create/')
@@ -114,7 +114,7 @@ def test_create_restricted(self):
class UpdateViewTests(TestCase):
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_update_post(self):
a = Author.objects.create(
@@ -252,7 +252,7 @@ def test_update_get_object(self):
class DeleteViewTests(TestCase):
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_delete_by_post(self):
a = Author.objects.create(**{'name': 'Randall Munroe', 'slug': 'randall-munroe'})
View
2  tests/generic_views/list.py
@@ -11,7 +11,7 @@
class ListViewTests(TestCase):
fixtures = ['generic-views-test-data.json']
- urls = 'regressiontests.generic_views.urls'
+ urls = 'generic_views.urls'
def test_items(self):
res = self.client.get('/list/dict/')
View
2  tests/handlers/tests.py
@@ -31,7 +31,7 @@ def test_bad_path_info(self):
class SignalsTests(TestCase):
- urls = 'regressiontests.handlers.urls'
+ urls = 'handlers.urls'
def setUp(self):
self.signals = []
View
8 tests/i18n/patterns/tests.py