8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

Remove plural from urls

This commit is contained in:
Maël Kervella 2018-06-20 11:44:43 +00:00
parent 3a129a5d6e
commit 1951ab467d
2 changed files with 112 additions and 112 deletions

View file

@ -51,56 +51,56 @@ class APIEndpointsTestCase(APITestCase):
]
auth_no_perm_endpoints = []
auth_perm_endpoints = [
'/api/cotisations/articles/',
# '/api/cotisations/articles/<pk>/',
'/api/cotisations/banques/',
# '/api/cotisations/banques/<pk>/',
'/api/cotisations/cotisations/',
# '/api/cotisations/cotisations/<pk>/',
'/api/cotisations/factures/',
# '/api/cotisations/factures/<pk>/',
'/api/cotisations/paiements/',
# '/api/cotisations/paiements/<pk>/',
'/api/cotisations/ventes/',
# '/api/cotisations/ventes/<pk>/',
'/api/machines/domains/',
# '/api/machines/domains/<pk>/',
'/api/machines/extensions/',
# '/api/machines/extensions/<pk>/',
'/api/machines/interfaces/',
# '/api/machines/interfaces/<pk>/',
'/api/machines/iplists/',
# '/api/machines/iplists/<pk>/',
'/api/machines/iptypes/',
# '/api/machines/iptypes/<pk>/',
'/api/machines/ipv6lists/',
# '/api/machines/ipv6lists/<pk>/',
'/api/machines/machines/',
# '/api/machines/machines/<pk>/',
'/api/machines/machinetypes/',
# '/api/machines/machinetypes/<pk>/',
'/api/cotisations/article/',
# '/api/cotisations/article/<pk>/',
'/api/cotisations/banque/',
# '/api/cotisations/banque/<pk>/',
'/api/cotisations/cotisation/',
# '/api/cotisations/cotisation/<pk>/',
'/api/cotisations/facture/',
# '/api/cotisations/facture/<pk>/',
'/api/cotisations/paiement/',
# '/api/cotisations/paiement/<pk>/',
'/api/cotisations/vente/',
# '/api/cotisations/vente/<pk>/',
'/api/machines/domain/',
# '/api/machines/domain/<pk>/',
'/api/machines/extension/',
# '/api/machines/extension/<pk>/',
'/api/machines/interface/',
# '/api/machines/interface/<pk>/',
'/api/machines/iplist/',
# '/api/machines/iplist/<pk>/',
'/api/machines/iptype/',
# '/api/machines/iptype/<pk>/',
'/api/machines/ipv6list/',
# '/api/machines/ipv6list/<pk>/',
'/api/machines/machine/',
# '/api/machines/machine/<pk>/',
'/api/machines/machinetype/',
# '/api/machines/machinetype/<pk>/',
'/api/machines/mx/',
# '/api/machines/mx/<pk>/',
'/api/machines/nas/',
# '/api/machines/nas/<pk>/',
'/api/machines/ns/',
# '/api/machines/ns/<pk>/',
'/api/machines/ouvertureportlists/',
# '/api/machines/ouvertureportlists/<pk>/',
'/api/machines/ouvertureports/',
# '/api/machines/ouvertureports/<pk>/',
'/api/machines/servicelinks/',
# '/api/machines/servicelinks/<pk>/',
'/api/machines/services/',
# '/api/machines/services/<pk>/',
'/api/machines/ouvertureportlist/',
# '/api/machines/ouvertureportlist/<pk>/',
'/api/machines/ouvertureport/',
# '/api/machines/ouvertureport/<pk>/',
'/api/machines/servicelink/',
# '/api/machines/servicelink/<pk>/',
'/api/machines/service/',
# '/api/machines/service/<pk>/',
'/api/machines/soa/',
# '/api/machines/soa/<pk>/',
'/api/machines/srv/',
# '/api/machines/srv/<pk>/',
'/api/machines/txt/',
# '/api/machines/txt/<pk>/',
'/api/machines/vlans/',
# '/api/machines/vlans/<pk>/',
'/api/machines/vlan/',
# '/api/machines/vlan/<pk>/',
'/api/preferences/optionaluser/',
'/api/preferences/optionalmachine/',
'/api/preferences/optionaltopologie/',
@ -128,24 +128,24 @@ class APIEndpointsTestCase(APITestCase):
# '/api/topologie/switchbay/<pk>/',
'/api/topologie/switchport/',
# '/api/topologie/switchport/<pk>/',
'/api/users/adherents/',
# '/api/users/adherents/<pk>/',
'/api/users/bans/',
# '/api/users/bans/<pk>/',
'/api/users/clubs/',
# '/api/users/clubs/<pk>/',
'/api/users/listrights/',
# '/api/users/listrights/<pk>/',
'/api/users/schools/',
# '/api/users/schools/<pk>/',
'/api/users/serviceusers/',
# '/api/users/serviceusers/<pk>/',
'/api/users/shells/',
# '/api/users/shells/<pk>/',
'/api/users/users/',
# '/api/users/users/<pk>/',
'/api/users/whitelists/',
# '/api/users/whitelists/<pk>/',
'/api/users/adherent/',
# '/api/users/adherent/<pk>/',
'/api/users/ban/',
# '/api/users/ban/<pk>/',
'/api/users/club/',
# '/api/users/club/<pk>/',
'/api/users/listright/',
# '/api/users/listright/<pk>/',
'/api/users/school/',
# '/api/users/school/<pk>/',
'/api/users/serviceuser/',
# '/api/users/serviceuser/<pk>/',
'/api/users/shell/',
# '/api/users/shell/<pk>/',
'/api/users/user/',
# '/api/users/user/<pk>/',
'/api/users/whitelist/',
# '/api/users/whitelist/<pk>/',
'/api/dns/zones/',
'/api/dhcp/hostmacip/',
'/api/mailing/standard',
@ -331,31 +331,31 @@ class APIPaginationTestCase(APITestCase):
"""
endpoints = [
'/api/cotisations/articles/',
'/api/cotisations/banques/',
'/api/cotisations/cotisations/',
'/api/cotisations/factures/',
'/api/cotisations/paiements/',
'/api/cotisations/ventes/',
'/api/machines/domains/',
'/api/machines/extensions/',
'/api/machines/interfaces/',
'/api/machines/iplists/',
'/api/machines/iptypes/',
'/api/machines/ipv6lists/',
'/api/machines/machines/',
'/api/machines/machinetypes/',
'/api/cotisations/article/',
'/api/cotisations/banque/',
'/api/cotisations/cotisation/',
'/api/cotisations/facture/',
'/api/cotisations/paiement/',
'/api/cotisations/vente/',
'/api/machines/domain/',
'/api/machines/extension/',
'/api/machines/interface/',
'/api/machines/iplist/',
'/api/machines/iptype/',
'/api/machines/ipv6list/',
'/api/machines/machine/',
'/api/machines/machinetype/',
'/api/machines/mx/',
'/api/machines/nas/',
'/api/machines/ns/',
'/api/machines/ouvertureportlists/',
'/api/machines/ouvertureports/',
'/api/machines/servicelinks/',
'/api/machines/services/',
'/api/machines/ouvertureportlist/',
'/api/machines/ouvertureport/',
'/api/machines/servicelink/',
'/api/machines/service/',
'/api/machines/soa/',
'/api/machines/srv/',
'/api/machines/txt/',
'/api/machines/vlans/',
'/api/machines/vlan/',
'/api/preferences/service/',
'/api/topologie/acesspoint/',
'/api/topologie/building/',
@ -366,15 +366,15 @@ class APIPaginationTestCase(APITestCase):
'/api/topologie/switch/',
'/api/topologie/switchbay/',
'/api/topologie/switchport/',
'/api/users/adherents/',
'/api/users/bans/',
'/api/users/clubs/',
'/api/users/listrights/',
'/api/users/schools/',
'/api/users/serviceusers/',
'/api/users/shells/',
'/api/users/users/',
'/api/users/whitelists/',
'/api/users/adherent/',
'/api/users/ban/',
'/api/users/club/',
'/api/users/listright/',
'/api/users/school/',
'/api/users/serviceuser/',
'/api/users/shell/',
'/api/users/user/',
'/api/users/whitelist/',
'/api/dns/zones/',
'/api/dhcp/hostmacip/',
'/api/mailing/standard',

View file

@ -34,32 +34,32 @@ from .routers import AllViewsRouter
router = AllViewsRouter()
# COTISATIONS
router.register_viewset(r'cotisations/factures', views.FactureViewSet)
router.register_viewset(r'cotisations/ventes', views.VenteViewSet)
router.register_viewset(r'cotisations/articles', views.ArticleViewSet)
router.register_viewset(r'cotisations/banques', views.BanqueViewSet)
router.register_viewset(r'cotisations/paiements', views.PaiementViewSet)
router.register_viewset(r'cotisations/cotisations', views.CotisationViewSet)
router.register_viewset(r'cotisations/facture', views.FactureViewSet)
router.register_viewset(r'cotisations/vente', views.VenteViewSet)
router.register_viewset(r'cotisations/article', views.ArticleViewSet)
router.register_viewset(r'cotisations/banque', views.BanqueViewSet)
router.register_viewset(r'cotisations/paiement', views.PaiementViewSet)
router.register_viewset(r'cotisations/cotisation', views.CotisationViewSet)
# MACHINES
router.register_viewset(r'machines/machines', views.MachineViewSet)
router.register_viewset(r'machines/machinetypes', views.MachineTypeViewSet)
router.register_viewset(r'machines/iptypes', views.IpTypeViewSet)
router.register_viewset(r'machines/vlans', views.VlanViewSet)
router.register_viewset(r'machines/machine', views.MachineViewSet)
router.register_viewset(r'machines/machinetype', views.MachineTypeViewSet)
router.register_viewset(r'machines/iptype', views.IpTypeViewSet)
router.register_viewset(r'machines/vlan', views.VlanViewSet)
router.register_viewset(r'machines/nas', views.NasViewSet)
router.register_viewset(r'machines/soa', views.SOAViewSet)
router.register_viewset(r'machines/extensions', views.ExtensionViewSet)
router.register_viewset(r'machines/extension', views.ExtensionViewSet)
router.register_viewset(r'machines/mx', views.MxViewSet)
router.register_viewset(r'machines/ns', views.NsViewSet)
router.register_viewset(r'machines/txt', views.TxtViewSet)
router.register_viewset(r'machines/srv', views.SrvViewSet)
router.register_viewset(r'machines/interfaces', views.InterfaceViewSet)
router.register_viewset(r'machines/ipv6lists', views.Ipv6ListViewSet)
router.register_viewset(r'machines/domains', views.DomainViewSet)
router.register_viewset(r'machines/iplists', views.IpListViewSet)
router.register_viewset(r'machines/services', views.ServiceViewSet)
router.register_viewset(r'machines/servicelinks', views.ServiceLinkViewSet, base_name='servicelink')
router.register_viewset(r'machines/ouvertureportlists', views.OuverturePortListViewSet)
router.register_viewset(r'machines/ouvertureports', views.OuverturePortViewSet)
router.register_viewset(r'machines/interface', views.InterfaceViewSet)
router.register_viewset(r'machines/ipv6list', views.Ipv6ListViewSet)
router.register_viewset(r'machines/domain', views.DomainViewSet)
router.register_viewset(r'machines/iplist', views.IpListViewSet)
router.register_viewset(r'machines/service', views.ServiceViewSet)
router.register_viewset(r'machines/servicelink', views.ServiceLinkViewSet, base_name='servicelink')
router.register_viewset(r'machines/ouvertureportlist', views.OuverturePortListViewSet)
router.register_viewset(r'machines/ouvertureport', views.OuverturePortViewSet)
# PREFERENCES
router.register_view(r'preferences/optionaluser', views.OptionalUserView),
router.register_view(r'preferences/optionalmachine', views.OptionalMachineView),
@ -80,15 +80,15 @@ router.register_viewset(r'topologie/building', views.BuildingViewSet)
router.register_viewset(r'topologie/switchport', views.SwitchPortViewSet, base_name='switchport')
router.register_viewset(r'topologie/room', views.RoomViewSet)
# USERS
router.register_viewset(r'users/users', views.UserViewSet)
router.register_viewset(r'users/clubs', views.ClubViewSet)
router.register_viewset(r'users/adherents', views.AdherentViewSet)
router.register_viewset(r'users/serviceusers', views.ServiceUserViewSet)
router.register_viewset(r'users/schools', views.SchoolViewSet)
router.register_viewset(r'users/listrights', views.ListRightViewSet)
router.register_viewset(r'users/shells', views.ShellViewSet, base_name='shell')
router.register_viewset(r'users/bans', views.BanViewSet)
router.register_viewset(r'users/whitelists', views.WhitelistViewSet)
router.register_viewset(r'users/user', views.UserViewSet)
router.register_viewset(r'users/club', views.ClubViewSet)
router.register_viewset(r'users/adherent', views.AdherentViewSet)
router.register_viewset(r'users/serviceuser', views.ServiceUserViewSet)
router.register_viewset(r'users/school', views.SchoolViewSet)
router.register_viewset(r'users/listright', views.ListRightViewSet)
router.register_viewset(r'users/shell', views.ShellViewSet, base_name='shell')
router.register_viewset(r'users/ban', views.BanViewSet)
router.register_viewset(r'users/whitelist', views.WhitelistViewSet)
# SERVICE REGEN
router.register_viewset(r'services/regen', views.ServiceRegenViewSet, base_name='serviceregen')
# DHCP