From e5a95e8de39255128d3e248233eb43bb860860d7 Mon Sep 17 00:00:00 2001 From: LeandroRoberto Date: Thu, 8 Mar 2018 13:56:35 -0300 Subject: [PATCH] ajusta urls ao exigido em test_urls --- sapl/compilacao/urls.py | 30 +++++++++++++++--------------- sapl/test_urls.py | 7 +++++-- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/sapl/compilacao/urls.py b/sapl/compilacao/urls.py index 69b6fd654..decbd5578 100644 --- a/sapl/compilacao/urls.py +++ b/sapl/compilacao/urls.py @@ -98,31 +98,31 @@ urlpatterns_compilacao = [ views.PublicacaoDeleteView.as_view(), name='ta_pub_delete'), - url(r'^config/tipo-textoarticulado$', - views.TipoTaListView.as_view(), name='tipo_ta_list'), - url(r'^config/tipo-textoarticulado/create$', - views.TipoTaCreateView.as_view(), name='tipo_ta_create'), - url(r'^config/tipo-textoarticulado/(?P[0-9]+)$', - views.TipoTaDetailView.as_view(), name='tipo_ta_detail'), - url(r'^config/tipo-textoarticulado/(?P[0-9]+)/edit$', - views.TipoTaUpdateView.as_view(), name='tipo_ta_edit'), - url(r'^config/tipo-textoarticulado/(?P[0-9]+)/delete$', - views.TipoTaDeleteView.as_view(), name='tipo_ta_delete'), ] urlpatterns = [ url(r'^ta/', include(urlpatterns_compilacao)), - url(r'^ta/config/tipo-nota/', + url(r'^sistema/ta/config/tipo-nota/', include(TipoNotaCrud.get_urls())), - url(r'^ta/config/tipo-vide/', + url(r'^sistema/ta/config/tipo-vide/', include(TipoVideCrud.get_urls())), - url(r'^ta/config/tipo-publicacao/', + url(r'^sistema/ta/config/tipo-publicacao/', include(TipoPublicacaoCrud.get_urls())), - url(r'^ta/config/veiculo-publicacao/', + url(r'^sistema/ta/config/veiculo-publicacao/', include(VeiculoPublicacaoCrud.get_urls())), - url(r'^ta/config/tipo-dispositivo/', + url(r'^sistema/ta/config/tipo-dispositivo/', include(TipoDispositivoCrud.get_urls())), + url(r'^sistema/ta/config/tipo-textoarticulado$', + views.TipoTaListView.as_view(), name='tipo_ta_list'), + url(r'^sistema/ta/config/tipo-textoarticulado/create$', + views.TipoTaCreateView.as_view(), name='tipo_ta_create'), + url(r'^sistema/ta/config/tipo-textoarticulado/(?P[0-9]+)$', + views.TipoTaDetailView.as_view(), name='tipo_ta_detail'), + url(r'^sistema/ta/config/tipo-textoarticulado/(?P[0-9]+)/edit$', + views.TipoTaUpdateView.as_view(), name='tipo_ta_edit'), + url(r'^sistema/ta/config/tipo-textoarticulado/(?P[0-9]+)/delete$', + views.TipoTaDeleteView.as_view(), name='tipo_ta_delete'), ] diff --git a/sapl/test_urls.py b/sapl/test_urls.py index 9df5900ee..9c462fc19 100644 --- a/sapl/test_urls.py +++ b/sapl/test_urls.py @@ -1,18 +1,20 @@ -import pytest from django.apps import apps from django.contrib.auth import get_user_model from django.contrib.auth.management import _get_all_permissions from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.db import transaction -from django.utils.translation import ugettext_lazy as _ from django.utils.translation import string_concat +from django.utils.translation import ugettext_lazy as _ +import pytest + from sapl.crud.base import PermissionRequiredForAppCrudMixin from sapl.rules.apps import AppConfig, update_groups from scripts.lista_urls import lista_urls from .settings import SAPL_APPS + pytestmark = pytest.mark.django_db sapl_appconfs = [apps.get_app_config(n[5:]) for n in SAPL_APPS] @@ -171,6 +173,7 @@ apps_url_patterns_prefixs_and_users = { 'compilacao': { 'prefixs': [ '/ta', + '/sistema/ta', ]}, 'redireciona_urls': { 'prefixs': [