From 9f8251b8c3072bffa94c6ceff02d58521b1809a2 Mon Sep 17 00:00:00 2001 From: Tomas Date: Wed, 25 Sep 2019 07:42:08 +0200 Subject: [PATCH] Fixing tests --- .gitignore | 2 ++ example/app/test_msf.py | 2 +- example/example/settings.py | 2 +- example/example/urls.py | 5 ----- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index a7f7aeb..1833915 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ dist .coverage* .env example/example.db +.tox + diff --git a/example/app/test_msf.py b/example/app/test_msf.py index ccec10e..ca121e7 100644 --- a/example/app/test_msf.py +++ b/example/app/test_msf.py @@ -146,7 +146,7 @@ class MultiSelectTestCase(TestCase): """
  • """) actual_html = form.as_p() - if (1, 11) <= VERSION < (2, 0): + if (1, 11) <= VERSION: # Django 1.11+ does not assign 'for' attributes on labels if they # are group labels expected_html = expected_html.replace('label for="id_published_in_0"', 'label') diff --git a/example/example/settings.py b/example/example/settings.py index cf50cf4..ff2e5d0 100644 --- a/example/example/settings.py +++ b/example/example/settings.py @@ -181,7 +181,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', # Uncomment the next line to enable the admin: - 'django.contrib.admin', + # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', diff --git a/example/example/urls.py b/example/example/urls.py index 434007f..77c7f6a 100644 --- a/example/example/urls.py +++ b/example/example/urls.py @@ -16,7 +16,6 @@ from django import VERSION from django.conf import settings -from django.contrib import admin from django.views.static import serve @@ -41,8 +40,6 @@ except ImportError: # Django < 1.4 from django.urls import include, url -admin.autodiscover() - js_info_dict = { 'packages': ('django.conf',), } @@ -51,7 +48,6 @@ if VERSION < (1, 11): urlpatterns = patterns( '', url(r'^', include('app.urls')), - url(r'^admin/', include(admin.site.urls)), ) urlpatterns += patterns( '', @@ -60,7 +56,6 @@ if VERSION < (1, 11): else: urlpatterns = [ url(r'^', include('app.urls')), - url(r'^admin/', admin.site.urls), url( r'^%s(?P.*)$' % settings.MEDIA_URL[1:], serve,