mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
This commit is contained in:
parent
d7b9aaa366
commit
f3c43ad1fd
160 changed files with 23 additions and 757 deletions
|
@ -1,6 +1,5 @@
|
|||
from django.template.defaultfilters import unordered_list
|
||||
from django.test import SimpleTestCase
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
from ..utils import setup
|
||||
|
@ -88,7 +87,6 @@ class FunctionTests(SimpleTestCase):
|
|||
)
|
||||
|
||||
def test_ulitem(self):
|
||||
@python_2_unicode_compatible
|
||||
class ULItem(object):
|
||||
def __init__(self, title):
|
||||
self.title = title
|
||||
|
@ -115,7 +113,6 @@ class FunctionTests(SimpleTestCase):
|
|||
)
|
||||
|
||||
def test_ulitem_autoescape_off(self):
|
||||
@python_2_unicode_compatible
|
||||
class ULItem(object):
|
||||
def __init__(self, title):
|
||||
self.title = title
|
||||
|
|
|
@ -4,7 +4,6 @@ import os
|
|||
from django.template.engine import Engine
|
||||
from django.test.utils import override_settings
|
||||
from django.utils._os import upath
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
ROOT = os.path.dirname(os.path.abspath(upath(__file__)))
|
||||
|
@ -165,7 +164,6 @@ class SilentAttrClass(object):
|
|||
b = property(b)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class UTF8Class:
|
||||
"Class whose __str__ returns non-ASCII data on Python 2"
|
||||
def __str__(self):
|
||||
|
@ -173,13 +171,11 @@ class UTF8Class:
|
|||
|
||||
|
||||
# These two classes are used to test auto-escaping of unicode output.
|
||||
@python_2_unicode_compatible
|
||||
class UnsafeClass:
|
||||
def __str__(self):
|
||||
return 'you & me'
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SafeClass:
|
||||
def __str__(self):
|
||||
return mark_safe('you > me')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue