mirror of https://github.com/django/django.git
Fixed test failures on Python 3 - refs #12288
This commit is contained in:
parent
b575d690bb
commit
9c711ee3a6
|
@ -107,8 +107,10 @@ class BaseSettings(object):
|
|||
elif name == "ALLOWED_INCLUDE_ROOTS" and isinstance(value, six.string_types):
|
||||
raise ValueError("The ALLOWED_INCLUDE_ROOTS setting must be set "
|
||||
"to a tuple, not a string.")
|
||||
elif name == "INSTALLED_APPS" and len(value) != len(set(value)):
|
||||
raise ImproperlyConfigured("The INSTALLED_APPS setting must contain unique values.")
|
||||
elif name == "INSTALLED_APPS":
|
||||
value = list(value) # force evaluation of generators on Python 3
|
||||
if len(value) != len(set(value)):
|
||||
raise ImproperlyConfigured("The INSTALLED_APPS setting must contain unique values.")
|
||||
|
||||
object.__setattr__(self, name, value)
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ class TestComplexSettingOverride(TestCase):
|
|||
self.assertEqual('Overriding setting TEST_WARN can lead to unexpected behaviour.', str(w[-1].message))
|
||||
|
||||
|
||||
class UniqueSettngsTests(TestCase):
|
||||
class UniqueSettingsTests(TestCase):
|
||||
"""
|
||||
Tests for the INSTALLED_APPS setting.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue