Coverage for audoma/drf/routers.py: 100%

1 import copy

2

3

4 from rest_framework.routers import ( # NOQA # isort:skip

5 DefaultRouter,

6 SimpleRouter,

7 BaseRouter,

8)

9

10

11 class BulkRouter(DefaultRouter):

12 """

13 Map http methods to actions defined on the bulk mixins.

14 """

15

16 routes = copy.deepcopy(SimpleRouter.routes)

17 routes[0].mapping.update(

18 {

19 "put": "bulk_update",

20 "patch": "partial_bulk_update",

21 "delete": "bulk_destroy",

22 }

23 )