mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Remove unnecessary coerce to str() in test_decorators.py (#6637)
Was added only for Python 2 compatibility.
This commit is contained in:
parent
ff86f09f74
commit
b4e80ac721
|
@ -202,8 +202,7 @@ class ActionDecoratorTestCase(TestCase):
|
||||||
def method():
|
def method():
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
# Python 2.x compatibility - cast __name__ to str
|
method.__name__ = name
|
||||||
method.__name__ = str(name)
|
|
||||||
getattr(test_action.mapping, name)(method)
|
getattr(test_action.mapping, name)(method)
|
||||||
|
|
||||||
# ensure the mapping returns the correct method name
|
# ensure the mapping returns the correct method name
|
||||||
|
|
Loading…
Reference in New Issue
Block a user