From 3a129a5d6e3e86c7d9a0c5b55dd8257aaafabca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sun, 17 Jun 2018 02:00:15 +0000 Subject: [PATCH] Add missing endpoints in tests --- api/tests.py | 20 ++++++++++++++++++++ api/urls.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/api/tests.py b/api/tests.py index 24545864..89ab7bdd 100644 --- a/api/tests.py +++ b/api/tests.py @@ -101,6 +101,15 @@ class APIEndpointsTestCase(APITestCase): # '/api/machines/txt//', '/api/machines/vlans/', # '/api/machines/vlans//', + '/api/preferences/optionaluser/', + '/api/preferences/optionalmachine/', + '/api/preferences/optionaltopologie/', + '/api/preferences/generaloption/', + '/api/preferences/service/', +# '/api/preferences/service//', + '/api/preferences/assooption/', + '/api/preferences/homeoption/', + '/api/preferences/mailmessageoption/', '/api/topologie/acesspoint/', # '/api/topologie/acesspoint//', '/api/topologie/building/', @@ -137,6 +146,11 @@ class APIEndpointsTestCase(APITestCase): # '/api/users/users//', '/api/users/whitelists/', # '/api/users/whitelists//', + '/api/dns/zones/', + '/api/dhcp/hostmacip/', + '/api/mailing/standard', + '/api/mailing/club', + '/api/services/regen/', ] stduser = None @@ -342,6 +356,7 @@ class APIPaginationTestCase(APITestCase): '/api/machines/srv/', '/api/machines/txt/', '/api/machines/vlans/', + '/api/preferences/service/', '/api/topologie/acesspoint/', '/api/topologie/building/', '/api/topologie/constructorswitch/', @@ -360,6 +375,11 @@ class APIPaginationTestCase(APITestCase): '/api/users/shells/', '/api/users/users/', '/api/users/whitelists/', + '/api/dns/zones/', + '/api/dhcp/hostmacip/', + '/api/mailing/standard', + '/api/mailing/club', + '/api/services/regen/', ] superuser = None diff --git a/api/urls.py b/api/urls.py index 9353975f..c835429f 100644 --- a/api/urls.py +++ b/api/urls.py @@ -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/ouvertureports', views.OuverturePortViewSet) # PREFERENCES -router.register_viewset(r'preferences/service', views.ServiceViewSet), router.register_view(r'preferences/optionaluser', views.OptionalUserView), router.register_view(r'preferences/optionalmachine', views.OptionalMachineView), router.register_view(r'preferences/optionaltopologie', views.OptionalTopologieView), 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/homeoption', views.HomeOptionView), router.register_view(r'preferences/mailmessageoption', views.MailMessageOptionView),