1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #23919 -- Removed six.PY2/PY3 usage

Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz
2016-12-01 11:38:01 +01:00
parent e63d98b7be
commit c716fe8782
111 changed files with 305 additions and 1296 deletions

View File

@@ -3,7 +3,6 @@ from django.db import models
from django.db.models.fields.related import ForeignObject
from django.test.testcases import SimpleTestCase, skipIfDBFeature
from django.test.utils import isolate_apps, override_settings
from django.utils import six
@isolate_apps('invalid_models_tests')
@@ -655,10 +654,8 @@ class RelativeFieldTests(SimpleTestCase):
'with', # a Python keyword
'related_name\n',
'',
'', # non-ASCII
]
# Python 2 crashes on non-ASCII strings.
if six.PY3:
invalid_related_names.append('')
class Parent(models.Model):
pass
@@ -695,10 +692,9 @@ class RelativeFieldTests(SimpleTestCase):
'ends_with_plus+',
'_+',
'+',
'',
'試驗+',
]
# Python 2 crashes on non-ASCII strings.
if six.PY3:
related_names.extend(['', '試驗+'])
class Parent(models.Model):
pass