Conditions | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | from djet import restframework |
||
15 | def test_action_reflect_http_method(self): |
||
16 | request = self.factory.get() |
||
17 | |||
18 | view = self.view_class() |
||
19 | view.action_map = {'get': 'retrieve'} |
||
20 | |||
21 | # reproduce DRF wrapping |
||
22 | with override_method(view, Request(request), 'GET') as request: |
||
23 | view.dispatch(request) |
||
24 | self.assertEqual(view.action, 'retrieve') |
||
25 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.