mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 13:54:47 +03:00
Code style
This commit is contained in:
parent
963cf95753
commit
7b7ef95004
|
@ -217,22 +217,21 @@ class TestRouterGeneratedSchema(TestCase):
|
|||
]
|
||||
))
|
||||
post_action = ('custom_action_post',
|
||||
coreapi.Link(
|
||||
url='/example/{pk}/custom_action/',
|
||||
action='post',
|
||||
encoding='application/json',
|
||||
fields=[
|
||||
coreapi.Field('pk', required=True, location='path'),
|
||||
coreapi.Field('c', required=True, location='form'),
|
||||
coreapi.Field('d', required=False, location='form'),
|
||||
]
|
||||
))
|
||||
coreapi.Link(
|
||||
url='/example/{pk}/custom_action/',
|
||||
action='post',
|
||||
encoding='application/json',
|
||||
fields=[
|
||||
coreapi.Field('pk', required=True, location='path'),
|
||||
coreapi.Field('c', required=True, location='form'),
|
||||
coreapi.Field('d', required=False, location='form'),
|
||||
]
|
||||
))
|
||||
|
||||
self.assertIn(put_action, response.data['example'].items())
|
||||
self.assertIn(post_action, response.data['example'].items())
|
||||
|
||||
|
||||
|
||||
@unittest.skipUnless(coreapi, 'coreapi is not installed')
|
||||
class TestSchemaGenerator(TestCase):
|
||||
def test_view(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user