mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +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',
|
'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):
|
def test_detail_required(self):
|
||||||
with pytest.raises(AssertionError) as excinfo:
|
with pytest.raises(AssertionError) as excinfo:
|
||||||
@action()
|
@action()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user