Fixing tests

This commit is contained in:
Tomas 2019-09-25 07:42:08 +02:00
parent 27851b8eb5
commit 9f8251b8c3
4 changed files with 4 additions and 7 deletions

2
.gitignore vendored
View file

@ -10,3 +10,5 @@ dist
.coverage*
.env
example/example.db
.tox

View file

@ -146,7 +146,7 @@ class MultiSelectTestCase(TestCase):
"""<li><label for="id_published_in_1_2"><input id="id_published_in_1_2" name="published_in" type="checkbox" value="AZ" /> Arizona</label></li></ul></li></ul></p>""")
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')

View file

@ -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',

View file

@ -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<path>.*)$' % settings.MEDIA_URL[1:],
serve,