mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 17:09:59 +03:00
sort on code
This commit is contained in:
parent
0c6e1feb71
commit
c1a8556695
|
@ -114,4 +114,4 @@ if __name__ == "__main__":
|
|||
exit_on_failure(flake8_main(FLAKE8_ARGS))
|
||||
|
||||
if run_isort:
|
||||
exit_on_failure(isort_main(ISORT_ARGS))
|
||||
exit_on_failure(isort_main(ISORT_ARGS))
|
||||
|
|
2
setup.py
2
setup.py
|
@ -110,4 +110,4 @@ setup(
|
|||
# Doing so helps ensure your question is helpful to other users.
|
||||
# Queries directly to my email are likely to receive a canned response.
|
||||
#
|
||||
# Many thanks for your understanding.
|
||||
# Many thanks for your understanding.
|
||||
|
|
|
@ -3,8 +3,8 @@ from django.utils import translation
|
|||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from rest_framework.exceptions import (
|
||||
APIException, ErrorDetail, Throttled, _get_error_details, bad_request,
|
||||
server_error, ValidationError
|
||||
APIException, ErrorDetail, Throttled, ValidationError, _get_error_details,
|
||||
bad_request, server_error
|
||||
)
|
||||
|
||||
|
||||
|
@ -73,10 +73,8 @@ class ErrorDetailTests(TestCase):
|
|||
assert ErrorDetail('msg1', 'code') != 'msg2'
|
||||
|
||||
def test_repr(self):
|
||||
assert repr(ErrorDetail('msg1')) == \
|
||||
'ErrorDetail(string={!r}, code=None)'.format('msg1')
|
||||
assert repr(ErrorDetail('msg1', 'code')) == \
|
||||
'ErrorDetail(string={!r}, code={!r})'.format('msg1', 'code')
|
||||
assert repr(ErrorDetail('msg1')) == 'ErrorDetail(string={!r}, code=None)'.format('msg1')
|
||||
assert repr(ErrorDetail('msg1', 'code')) == 'ErrorDetail(string={!r}, code={!r})'.format('msg1', 'code')
|
||||
|
||||
def test_str(self):
|
||||
assert str(ErrorDetail('msg1')) == 'msg1'
|
||||
|
|
Loading…
Reference in New Issue
Block a user