mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 11:00:13 +03:00
fixup! Handle "suffix" used in action decorator kwargs
This commit is contained in:
parent
cefc47890a
commit
f2d0809816
|
@ -187,6 +187,16 @@ class ActionDecoratorTestCase(TestCase):
|
|||
'description': 'Description',
|
||||
}
|
||||
|
||||
def test_detail_suffix(self):
|
||||
@action(detail=True, suffix='Suffix')
|
||||
def test_action(request):
|
||||
raise NotImplementedError
|
||||
|
||||
assert test_action.kwargs == {
|
||||
'description': None,
|
||||
'suffix': 'Suffix',
|
||||
}
|
||||
|
||||
def test_detail_required(self):
|
||||
with pytest.raises(AssertionError) as excinfo:
|
||||
@action()
|
||||
|
|
Loading…
Reference in New Issue
Block a user