Code style

This commit is contained in:
Nik 2016-08-24 19:09:44 +03:00
parent 963cf95753
commit 7b7ef95004

View File

@ -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):