8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Add missing endpoints in tests

This commit is contained in:
Maël Kervella 2018-06-17 02:00:15 +00:00 committed by Maël Kervella
parent 4c1af06780
commit 3a129a5d6e
2 changed files with 21 additions and 1 deletions

View file

@ -101,6 +101,15 @@ class APIEndpointsTestCase(APITestCase):
# '/api/machines/txt/<pk>/', # '/api/machines/txt/<pk>/',
'/api/machines/vlans/', '/api/machines/vlans/',
# '/api/machines/vlans/<pk>/', # '/api/machines/vlans/<pk>/',
'/api/preferences/optionaluser/',
'/api/preferences/optionalmachine/',
'/api/preferences/optionaltopologie/',
'/api/preferences/generaloption/',
'/api/preferences/service/',
# '/api/preferences/service/<pk>/',
'/api/preferences/assooption/',
'/api/preferences/homeoption/',
'/api/preferences/mailmessageoption/',
'/api/topologie/acesspoint/', '/api/topologie/acesspoint/',
# '/api/topologie/acesspoint/<pk>/', # '/api/topologie/acesspoint/<pk>/',
'/api/topologie/building/', '/api/topologie/building/',
@ -137,6 +146,11 @@ class APIEndpointsTestCase(APITestCase):
# '/api/users/users/<pk>/', # '/api/users/users/<pk>/',
'/api/users/whitelists/', '/api/users/whitelists/',
# '/api/users/whitelists/<pk>/', # '/api/users/whitelists/<pk>/',
'/api/dns/zones/',
'/api/dhcp/hostmacip/',
'/api/mailing/standard',
'/api/mailing/club',
'/api/services/regen/',
] ]
stduser = None stduser = None
@ -342,6 +356,7 @@ class APIPaginationTestCase(APITestCase):
'/api/machines/srv/', '/api/machines/srv/',
'/api/machines/txt/', '/api/machines/txt/',
'/api/machines/vlans/', '/api/machines/vlans/',
'/api/preferences/service/',
'/api/topologie/acesspoint/', '/api/topologie/acesspoint/',
'/api/topologie/building/', '/api/topologie/building/',
'/api/topologie/constructorswitch/', '/api/topologie/constructorswitch/',
@ -360,6 +375,11 @@ class APIPaginationTestCase(APITestCase):
'/api/users/shells/', '/api/users/shells/',
'/api/users/users/', '/api/users/users/',
'/api/users/whitelists/', '/api/users/whitelists/',
'/api/dns/zones/',
'/api/dhcp/hostmacip/',
'/api/mailing/standard',
'/api/mailing/club',
'/api/services/regen/',
] ]
superuser = None superuser = None

View file

@ -61,11 +61,11 @@ router.register_viewset(r'machines/servicelinks', views.ServiceLinkViewSet, base
router.register_viewset(r'machines/ouvertureportlists', views.OuverturePortListViewSet) router.register_viewset(r'machines/ouvertureportlists', views.OuverturePortListViewSet)
router.register_viewset(r'machines/ouvertureports', views.OuverturePortViewSet) router.register_viewset(r'machines/ouvertureports', views.OuverturePortViewSet)
# PREFERENCES # PREFERENCES
router.register_viewset(r'preferences/service', views.ServiceViewSet),
router.register_view(r'preferences/optionaluser', views.OptionalUserView), router.register_view(r'preferences/optionaluser', views.OptionalUserView),
router.register_view(r'preferences/optionalmachine', views.OptionalMachineView), router.register_view(r'preferences/optionalmachine', views.OptionalMachineView),
router.register_view(r'preferences/optionaltopologie', views.OptionalTopologieView), router.register_view(r'preferences/optionaltopologie', views.OptionalTopologieView),
router.register_view(r'preferences/generaloption', views.GeneralOptionView), router.register_view(r'preferences/generaloption', views.GeneralOptionView),
router.register_viewset(r'preferences/service', views.ServiceViewSet),
router.register_view(r'preferences/assooption', views.AssoOptionView), router.register_view(r'preferences/assooption', views.AssoOptionView),
router.register_view(r'preferences/homeoption', views.HomeOptionView), router.register_view(r'preferences/homeoption', views.HomeOptionView),
router.register_view(r'preferences/mailmessageoption', views.MailMessageOptionView), router.register_view(r'preferences/mailmessageoption', views.MailMessageOptionView),