From 4bf1a0fdf45264bad39a349e36029876e6529fb7 Mon Sep 17 00:00:00 2001
From: Eduardo Edson Batista Cordeiro Alves
Date: Thu, 20 Oct 2016 15:14:12 -0200
Subject: [PATCH 01/16] Fix #722
---
sapl/materia/views.py | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/sapl/materia/views.py b/sapl/materia/views.py
index 492091880..7cd83a2ea 100644
--- a/sapl/materia/views.py
+++ b/sapl/materia/views.py
@@ -123,7 +123,6 @@ def recuperar_materia(request):
OrgaoCrud = CrudAux.build(Orgao, 'orgao')
TipoProposicaoCrud = CrudAux.build(TipoProposicao, 'tipo_proposicao')
StatusTramitacaoCrud = CrudAux.build(StatusTramitacao, 'status_tramitacao')
-UnidadeTramitacaoCrud = CrudAux.build(UnidadeTramitacao, 'unidade_tramitacao')
def criar_materia_proposicao(proposicao):
@@ -304,6 +303,32 @@ class ConfirmarProposicao(PermissionRequiredMixin, CreateView):
reverse('sapl.materia:proposicao-devolvida'))
+class UnidadeTramitacaoCrud(CrudAux):
+ model = UnidadeTramitacao
+ help_path = 'unidade_tramitacao'
+
+ class BaseMixin(Crud.BaseMixin):
+ list_field_names = ['comissao', 'orgao', 'parlamentar']
+
+ class ListView(Crud.ListView):
+ template_name = "crud/list.html"
+
+ def get_headers(self):
+ return [_('Unidade de Tramitação')]
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ for row in context['rows']:
+ if row[0][0]: # Comissão
+ pass
+ elif row[1][0]: # Órgão
+ row[0] = (row[1][0], row[0][1])
+ elif row[2][0]: # Parlamentar
+ row[0] = (row[2][0], row[0][1])
+ row[1], row[2] = ('', ''), ('', '')
+ return context
+
+
class ProposicaoCrud(Crud):
"""
TODO: Entre outros comportamento gerais, mesmo que um usuário tenha
@@ -518,7 +543,7 @@ class TramitacaoCrud(MasterDetailCrud):
class BaseMixin(MasterDetailCrud.BaseMixin):
list_field_names = ['data_tramitacao', 'unidade_tramitacao_local',
- 'unidade_tramitacao_destino', 'status']
+ 'mitacao_destino', 'status']
ordered_list = False
ordering = '-data_tramitacao',
From caaa0854c894886a2e1f812d404dd06541806df9 Mon Sep 17 00:00:00 2001
From: Eduardo Edson Batista Cordeiro Alves
Date: Thu, 20 Oct 2016 15:28:51 -0200
Subject: [PATCH 02/16] =?UTF-8?q?Adiciona=20op=C3=A7=C3=A3o=20'Tanto=20Faz?=
=?UTF-8?q?'=20na=20pesquisa=20de=20mat=C3=A9ria=20(tramita=C3=A7=C3=A3o)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sapl/materia/forms.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py
index b41549018..a483f48fa 100644
--- a/sapl/materia/forms.py
+++ b/sapl/materia/forms.py
@@ -497,6 +497,10 @@ class MateriaLegislativaFilterSet(django_filters.FilterSet):
ementa = django_filters.CharFilter(lookup_expr='icontains')
+ em_tramitacao = django_filters.ChoiceFilter(required=False,
+ label=u'Ano da Matéria',
+ choices=em_tramitacao)
+
class Meta:
model = MateriaLegislativa
fields = ['numero',
From 56ca3a348bb4501af63603e905749c274917133e Mon Sep 17 00:00:00 2001
From: Eduardo Edson Batista Cordeiro Alves
Date: Thu, 20 Oct 2016 15:29:56 -0200
Subject: [PATCH 03/16] =?UTF-8?q?Conserta=20layout=20de=20pesquisa=20de=20?=
=?UTF-8?q?mat=C3=A9ria?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sapl/materia/forms.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py
index a483f48fa..26f14a64b 100644
--- a/sapl/materia/forms.py
+++ b/sapl/materia/forms.py
@@ -567,7 +567,7 @@ class MateriaLegislativaFilterSet(django_filters.FilterSet):
'limpar Autor',
css_class='btn btn-primary btn-sm'), 10)])
row5 = to_row(
- [('autoria__autor__tipo', 6),
+ [('autoria__autor__tipo', 12),
# ('autoria__autor__partido', 6)
])
row6 = to_row(
From bccb8c5a938c39814189fd19bcad62c51068e8bb Mon Sep 17 00:00:00 2001
From: Eduardo Edson Batista Cordeiro Alves
Date: Thu, 20 Oct 2016 15:52:38 -0200
Subject: [PATCH 04/16] Conserta link para relatorios
---
sapl/templates/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sapl/templates/index.html b/sapl/templates/index.html
index f5e70ae71..d4c2e9639 100644
--- a/sapl/templates/index.html
+++ b/sapl/templates/index.html
@@ -156,7 +156,7 @@
Contém informações estatísticas sobre a produção legislativa dos parlamentares e da Casa, dispostas e agrupadas de diferentes formas de acordo com parâmetros fornecidos.
-
+
From 62c5a640b057de7fa5729293227f4c21b0a412fd Mon Sep 17 00:00:00 2001
From: Eduardo Edson Batista Cordeiro Alves
Date: Thu, 20 Oct 2016 16:18:26 -0200
Subject: [PATCH 05/16] Fix qa
---
sapl/api/forms.py | 4 +---
sapl/api/pagination.py | 1 -
sapl/api/serializers.py | 2 --
sapl/api/urls.py | 3 +--
sapl/api/views.py | 11 +++++------
sapl/base/forms.py | 14 +++++++-------
sapl/base/templatetags/menus.py | 3 +--
sapl/base/urls.py | 2 +-
sapl/base/views.py | 4 ++--
sapl/comissoes/views.py | 2 +-
sapl/compilacao/views.py | 7 +++----
sapl/crud/base.py | 5 ++---
sapl/materia/forms.py | 10 +++++-----
sapl/materia/models.py | 2 --
sapl/materia/tests/test_materia.py | 4 ++--
sapl/materia/urls.py | 5 ++---
sapl/materia/views.py | 7 ++-----
sapl/parlamentares/views.py | 5 ++---
sapl/protocoloadm/forms.py | 3 +--
sapl/protocoloadm/models.py | 3 +--
sapl/protocoloadm/views.py | 16 ++++++----------
sapl/relatorios/views.py | 2 +-
sapl/sessao/models.py | 4 ++--
sapl/sessao/views.py | 1 -
sapl/settings.py | 3 +--
sapl/test_urls.py | 7 ++-----
sapl/utils.py | 16 +++++++++-------
scripts/inicializa_grupos_autorizacoes.py | 1 -
28 files changed, 60 insertions(+), 87 deletions(-)
diff --git a/sapl/api/forms.py b/sapl/api/forms.py
index 5ac75f00f..fef0952c8 100644
--- a/sapl/api/forms.py
+++ b/sapl/api/forms.py
@@ -1,11 +1,9 @@
-from django.contrib.contenttypes.fields import GenericRel
from django.db.models import Q
from django_filters.filters import MethodFilter, ModelChoiceFilter
from rest_framework.filters import FilterSet
from sapl.base.forms import autores_models_generic_relations
from sapl.base.models import Autor, TipoAutor
-from sapl.utils import SaplGenericRelation
class AutorChoiceFilterSet(FilterSet):
@@ -31,7 +29,7 @@ class AutorChoiceFilterSet(FilterSet):
order_by = []
for gr in autores_models_generic_relations():
- model = gr[0]
+ # model = gr[0]
sgr = gr[1]
for item in sgr:
if item.related_model != Autor:
diff --git a/sapl/api/pagination.py b/sapl/api/pagination.py
index 75941c1d3..bb7096a55 100644
--- a/sapl/api/pagination.py
+++ b/sapl/api/pagination.py
@@ -1,5 +1,4 @@
from django.core.paginator import EmptyPage
-from django.utils.encoding import force_text
from rest_framework import pagination
from rest_framework.response import Response
diff --git a/sapl/api/serializers.py b/sapl/api/serializers.py
index 1dc502450..44b6a44e6 100644
--- a/sapl/api/serializers.py
+++ b/sapl/api/serializers.py
@@ -1,8 +1,6 @@
-from django.contrib.contenttypes.fields import GenericRel
from rest_framework import serializers
from sapl.base.models import Autor
-from sapl.utils import SaplGenericRelation
class ChoiceSerializer(serializers.Serializer):
diff --git a/sapl/api/urls.py b/sapl/api/urls.py
index d87a5d48f..a23984ba7 100644
--- a/sapl/api/urls.py
+++ b/sapl/api/urls.py
@@ -1,11 +1,10 @@
from django.conf import settings
-from django.conf.urls import url, include
+from django.conf.urls import include, url
from sapl.api.views import AutorListView
from .apps import AppConfig
-
app_name = AppConfig.name
diff --git a/sapl/api/views.py b/sapl/api/views.py
index 4d5ee0ca8..e33807454 100644
--- a/sapl/api/views.py
+++ b/sapl/api/views.py
@@ -1,14 +1,13 @@
-
from django.db.models import Q
from django.http import Http404
from django.utils.translation import ugettext_lazy as _
from rest_framework.filters import DjangoFilterBackend
from rest_framework.generics import ListAPIView
-from rest_framework.permissions import IsAuthenticated, AllowAny
+from rest_framework.permissions import AllowAny, IsAuthenticated
from sapl.api.forms import AutorChoiceFilterSet
-from sapl.api.serializers import ChoiceSerializer, AutorSerializer,\
- AutorChoiceSerializer
+from sapl.api.serializers import (AutorChoiceSerializer, AutorSerializer,
+ ChoiceSerializer)
from sapl.base.models import Autor, TipoAutor
from sapl.utils import SaplGenericRelation, sapl_logger
@@ -32,7 +31,7 @@ class AutorListView(ListAPIView):
em combobox, radiobox, checkbox, etc com pesquisa básica
de Autores mas feito para Possíveis Autores armazenados
segundo o ContentType associado ao Tipo de Autor via
- relacionamento genérico.
+ relacionamento genérico.
Busca feita sem django-filter processada no get_queryset
-> processo no cadastro de autores para seleção e busca
dos possíveis autores
@@ -44,7 +43,7 @@ class AutorListView(ListAPIView):
- q - busca textual no nome do Autor ou em fields_search
declarados no field SaplGenericRelation das GenericFks
- A busca textual acontece via django-filter com a
+ A busca textual acontece via django-filter com a
variável `tr` igual 1 ou 3. Em caso contrário,
o django-filter é desativado e a busca é feita
no model do ContentType associado ao tipo.
diff --git a/sapl/base/forms.py b/sapl/base/forms.py
index 08bf8963d..4fcfc4ef7 100644
--- a/sapl/base/forms.py
+++ b/sapl/base/forms.py
@@ -1,7 +1,7 @@
+import django_filters
from crispy_forms.bootstrap import FieldWithButtons, InlineRadios, StrictButton
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Button, Div, Field, Fieldset, Layout, Row
-from crispy_forms.templatetags.crispy_forms_field import css_class
from django import forms
from django.conf import settings
from django.contrib.auth import get_user_model
@@ -13,8 +13,8 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.db import models, transaction
from django.forms import ModelForm
-from django.utils.translation import ugettext_lazy as _, string_concat
-import django_filters
+from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import string_concat
from sapl.base.models import Autor, TipoAutor
from sapl.crispy_layout_mixin import (SaplFormLayout, form_actions, to_column,
@@ -23,12 +23,11 @@ from sapl.materia.models import MateriaLegislativa
from sapl.sessao.models import SessaoPlenaria
from sapl.settings import MAX_IMAGE_UPLOAD_SIZE
from sapl.utils import (RANGE_ANOS, ImageThumbnailFileInput,
- RangeWidgetOverride, autor_label, autor_modal,
- SaplGenericRelation)
+ RangeWidgetOverride, SaplGenericRelation, autor_label,
+ autor_modal)
from .models import AppConfig, CasaLegislativa
-
ACTION_CREATE_USERS_AUTOR_CHOICE = [
('C', _('Criar novo Usuário')),
('A', _('Associar um usuário existente')),
@@ -181,7 +180,8 @@ class AutorForm(ModelForm):
autor_select = Row(to_column(('tipo', 3)),
Div(to_column(('nome', 5)),
- to_column(('cargo', 4)), css_class="div_nome_cargo"),
+ to_column(('cargo', 4)),
+ css_class="div_nome_cargo"),
to_column((autor_related, 9)),
to_column((Div(
Field('autor_related'),
diff --git a/sapl/base/templatetags/menus.py b/sapl/base/templatetags/menus.py
index 3d208e86b..6e8b4f4a3 100644
--- a/sapl/base/templatetags/menus.py
+++ b/sapl/base/templatetags/menus.py
@@ -1,11 +1,10 @@
+import yaml
from django import template
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
-import yaml
from sapl.utils import sapl_logger
-
register = template.Library()
diff --git a/sapl/base/urls.py b/sapl/base/urls.py
index 4fbda888b..c2a9fdc4a 100644
--- a/sapl/base/urls.py
+++ b/sapl/base/urls.py
@@ -3,7 +3,7 @@ from django.contrib.auth import views
from django.contrib.auth.decorators import permission_required
from django.views.generic.base import TemplateView
-from sapl.base.views import AutorCrud, TipoAutorCrud, ConfirmarEmailView
+from sapl.base.views import AutorCrud, ConfirmarEmailView, TipoAutorCrud
from .apps import AppConfig
from .forms import LoginForm
diff --git a/sapl/base/views.py b/sapl/base/views.py
index 3d43d672e..8f0b426aa 100644
--- a/sapl/base/views.py
+++ b/sapl/base/views.py
@@ -9,12 +9,12 @@ from django.core.urlresolvers import reverse
from django.db.models import Count, Q
from django.http import HttpResponseRedirect
from django.utils.encoding import force_bytes
-from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
+from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import TemplateView
from django_filters.views import FilterView
-from sapl.base.forms import AutorForm, TipoAutorForm, AutorFormForAdmin
+from sapl.base.forms import AutorForm, AutorFormForAdmin, TipoAutorForm
from sapl.base.models import Autor, TipoAutor
from sapl.crud.base import CrudAux
from sapl.materia.models import MateriaLegislativa, TipoMateriaLegislativa
diff --git a/sapl/comissoes/views.py b/sapl/comissoes/views.py
index fc679d611..0f767cbea 100644
--- a/sapl/comissoes/views.py
+++ b/sapl/comissoes/views.py
@@ -3,7 +3,7 @@ from django.core.urlresolvers import reverse
from django.db.models import F
from django.views.generic import ListView
-from sapl.crud.base import Crud, CrudAux, MasterDetailCrud, RP_DETAIL, RP_LIST
+from sapl.crud.base import RP_DETAIL, RP_LIST, Crud, CrudAux, MasterDetailCrud
from sapl.materia.models import MateriaLegislativa, Tramitacao
from .models import (CargoComissao, Comissao, Composicao, Participacao,
diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py
index ccafcb6c2..9b7f79d95 100644
--- a/sapl/compilacao/views.py
+++ b/sapl/compilacao/views.py
@@ -1,7 +1,7 @@
-from collections import OrderedDict
-from datetime import datetime, timedelta
import logging
import sys
+from collections import OrderedDict
+from datetime import datetime, timedelta
from braces.views import FormMessagesMixin
from django import forms
@@ -20,8 +20,8 @@ from django.shortcuts import get_object_or_404, redirect
from django.utils.dateparse import parse_date
from django.utils.decorators import method_decorator
from django.utils.encoding import force_text
-from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import string_concat
from django.views.generic.base import TemplateView
from django.views.generic.detail import DetailView
from django.views.generic.edit import (CreateView, DeleteView, FormView,
@@ -49,7 +49,6 @@ from sapl.compilacao.utils import (DISPOSITIVO_SELECT_RELATED,
from sapl.crud.base import Crud, CrudListView, make_pagination
from sapl.settings import BASE_DIR
-
TipoNotaCrud = Crud.build(TipoNota, 'tipo_nota')
TipoVideCrud = Crud.build(TipoVide, 'tipo_vide')
TipoPublicacaoCrud = Crud.build(TipoPublicacao, 'tipo_publicacao')
diff --git a/sapl/crud/base.py b/sapl/crud/base.py
index 694898115..55366bcc5 100644
--- a/sapl/crud/base.py
+++ b/sapl/crud/base.py
@@ -14,8 +14,8 @@ from django.db.models.fields.related import ForeignKey
from django.http.response import Http404
from django.utils.decorators import classonlymethod
from django.utils.encoding import force_text
-from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import string_concat
from django.views.generic import (CreateView, DeleteView, DetailView, ListView,
UpdateView)
from django.views.generic.base import ContextMixin
@@ -25,7 +25,6 @@ from sapl.crispy_layout_mixin import CrispyLayoutFormMixin, get_field_display
from sapl.settings import BASE_DIR
from sapl.utils import normalize
-
logger = logging.getLogger(BASE_DIR.name)
ACTION_LIST, ACTION_CREATE, ACTION_DETAIL, ACTION_UPDATE, ACTION_DELETE = \
@@ -1287,7 +1286,7 @@ class MasterDetailCrud(Crud):
if hasattr(obj, 'parent_field'):
parent_field = obj.parent_field.split('__')
if not obj.is_m2m or len(parent_field) > 1:
- field = self.model._meta.get_field(parent_field[0])
+ # field = self.model._meta.get_field(parent_field[0])
if isinstance(getattr(
self.object, parent_field[0]), models.Model):
diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py
index 26f14a64b..2a7f5bb92 100644
--- a/sapl/materia/forms.py
+++ b/sapl/materia/forms.py
@@ -1,5 +1,6 @@
from datetime import datetime
+import django_filters
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Button, Column, Fieldset, Layout
from django import forms
@@ -8,7 +9,6 @@ from django.db import models
from django.db.models import Max
from django.forms import ModelForm
from django.utils.translation import ugettext_lazy as _
-import django_filters
from sapl.base.models import Autor
from sapl.comissoes.models import Comissao
@@ -20,10 +20,10 @@ from sapl.settings import MAX_DOC_UPLOAD_SIZE
from sapl.utils import (RANGE_ANOS, RangeWidgetOverride, autor_label,
autor_modal)
-from .models import (AcompanhamentoMateria, Anexada, Autoria,
- DespachoInicial, DocumentoAcessorio, MateriaLegislativa,
- Numeracao, Proposicao, Relatoria, TipoMateriaLegislativa,
- Tramitacao, UnidadeTramitacao)
+from .models import (AcompanhamentoMateria, Anexada, Autoria, DespachoInicial,
+ DocumentoAcessorio, MateriaLegislativa, Numeracao,
+ Proposicao, Relatoria, TipoMateriaLegislativa, Tramitacao,
+ UnidadeTramitacao)
def ANO_CHOICES():
diff --git a/sapl/materia/models.py b/sapl/materia/models.py
index e326b7698..be92e9063 100644
--- a/sapl/materia/models.py
+++ b/sapl/materia/models.py
@@ -7,10 +7,8 @@ from sapl.base.models import Autor
from sapl.comissoes.models import Comissao
from sapl.parlamentares.models import Parlamentar
from sapl.utils import (RANGE_ANOS, YES_NO_CHOICES,
- get_settings_auth_user_model,
restringe_tipos_de_arquivo_txt)
-
EM_TRAMITACAO = [(1, 'Sim'),
(0, 'Não')]
diff --git a/sapl/materia/tests/test_materia.py b/sapl/materia/tests/test_materia.py
index ed6ae1ccd..db5dd7684 100644
--- a/sapl/materia/tests/test_materia.py
+++ b/sapl/materia/tests/test_materia.py
@@ -1,10 +1,10 @@
+import pytest
from django.contrib.auth import get_user_model
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.urlresolvers import reverse
from model_mommy import mommy
-import pytest
-from sapl.base.models import TipoAutor, Autor
+from sapl.base.models import Autor, TipoAutor
from sapl.comissoes.models import Comissao, TipoComissao
from sapl.materia.models import (Anexada, Autoria, DespachoInicial,
DocumentoAcessorio, MateriaLegislativa,
diff --git a/sapl/materia/urls.py b/sapl/materia/urls.py
index 5400978c6..c78796569 100644
--- a/sapl/materia/urls.py
+++ b/sapl/materia/urls.py
@@ -3,9 +3,8 @@ from django.conf.urls import include, url
from sapl.materia.views import (AcompanhamentoConfirmarView,
AcompanhamentoExcluirView,
AcompanhamentoMateriaView, AnexadaCrud,
- AutoriaCrud,
- ConfirmarProposicao, DespachoInicialCrud,
- DocumentoAcessorioCrud,
+ AutoriaCrud, ConfirmarProposicao,
+ DespachoInicialCrud, DocumentoAcessorioCrud,
DocumentoAcessorioEmLoteView,
LegislacaoCitadaCrud, MateriaLegislativaCrud,
MateriaLegislativaPesquisaView, MateriaTaView,
diff --git a/sapl/materia/views.py b/sapl/materia/views.py
index 7cd83a2ea..a85bdeb5f 100644
--- a/sapl/materia/views.py
+++ b/sapl/materia/views.py
@@ -5,7 +5,6 @@ from string import ascii_letters, digits
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML
from django.contrib import messages
-from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.core.mail import send_mail
@@ -15,7 +14,6 @@ from django.http import JsonResponse
from django.http.response import HttpResponseRedirect
from django.shortcuts import redirect
from django.template import Context, loader
-from django.utils.http import urlsafe_base64_decode
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, ListView, TemplateView, UpdateView
from django.views.generic.base import RedirectView
@@ -33,10 +31,9 @@ from sapl.materia.forms import AnexadaForm, LegislacaoCitadaForm
from sapl.norma.models import LegislacaoCitada
from sapl.utils import (TURNO_TRAMITACAO_CHOICES, YES_NO_CHOICES, autor_label,
autor_modal, gerar_hash_arquivo, get_base_url,
+ montar_row_autor, permission_required_for_app,
permissoes_autor, permissoes_materia,
- permissoes_protocoloadm, permission_required_for_app,
- montar_row_autor)
-
+ permissoes_protocoloadm)
from .forms import (AcessorioEmLoteFilterSet, AcompanhamentoMateriaForm,
ConfirmarProposicaoForm, DocumentoAcessorioForm,
diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py
index d31e4557d..4e937bd54 100644
--- a/sapl/parlamentares/views.py
+++ b/sapl/parlamentares/views.py
@@ -12,9 +12,8 @@ from sapl.crud.base import (RP_CHANGE, RP_DETAIL, RP_LIST, Crud, CrudAux,
from sapl.materia.models import Proposicao, Relatoria
from sapl.parlamentares.apps import AppConfig
-from .forms import (FiliacaoForm, LegislaturaCreateForm,
- LegislaturaUpdateForm, ParlamentarCreateForm,
- ParlamentarForm)
+from .forms import (FiliacaoForm, LegislaturaCreateForm, LegislaturaUpdateForm,
+ ParlamentarCreateForm, ParlamentarForm)
from .models import (CargoMesa, Coligacao, ComposicaoColigacao, ComposicaoMesa,
Dependente, Filiacao, Frente, Legislatura, Mandato,
NivelInstrucao, Parlamentar, Partido, SessaoLegislativa,
diff --git a/sapl/protocoloadm/forms.py b/sapl/protocoloadm/forms.py
index 7eae4909d..549cdc498 100644
--- a/sapl/protocoloadm/forms.py
+++ b/sapl/protocoloadm/forms.py
@@ -1,5 +1,6 @@
from datetime import datetime
+import django_filters
from crispy_forms.bootstrap import InlineRadios
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Button, Fieldset, Layout, Submit
@@ -8,7 +9,6 @@ from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db import models
from django.forms import ModelForm
from django.utils.translation import ugettext_lazy as _
-import django_filters
from sapl.base.models import Autor
from sapl.crispy_layout_mixin import form_actions, to_row
@@ -20,7 +20,6 @@ from .models import (DocumentoAcessorioAdministrativo, DocumentoAdministrativo,
Protocolo, TipoDocumentoAdministrativo,
TramitacaoAdministrativo)
-
TIPOS_PROTOCOLO = [('0', 'Enviado'), ('1', 'Recebido'), ('', 'Ambos')]
NATUREZA_PROCESSO = [('', 'Ambos'),
diff --git a/sapl/protocoloadm/models.py b/sapl/protocoloadm/models.py
index 5f713202b..4ec3393ed 100644
--- a/sapl/protocoloadm/models.py
+++ b/sapl/protocoloadm/models.py
@@ -5,8 +5,7 @@ from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from sapl.base.models import Autor
-from sapl.materia.models import (TipoMateriaLegislativa,
- UnidadeTramitacao)
+from sapl.materia.models import TipoMateriaLegislativa, UnidadeTramitacao
from sapl.utils import RANGE_ANOS, YES_NO_CHOICES
diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py
index 30a9606fa..8a52c1e38 100644
--- a/sapl/protocoloadm/views.py
+++ b/sapl/protocoloadm/views.py
@@ -1,13 +1,11 @@
from datetime import date, datetime
-import json
from braces.views import FormValidMessageMixin
from django.contrib import messages
from django.contrib.auth.mixins import PermissionRequiredMixin
-from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
-from django.db.models import Max, Q
-from django.http import HttpResponse, HttpResponseRedirect
+from django.db.models import Max
+from django.http import HttpResponseRedirect
from django.shortcuts import redirect
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, DetailView, FormView, ListView
@@ -15,7 +13,7 @@ from django.views.generic.base import TemplateView
from django_filters.views import FilterView
from sapl.base.apps import AppConfig as AppsAppConfig
-from sapl.base.models import AppConfig, Autor
+from sapl.base.models import AppConfig
from sapl.crud.base import Crud, CrudAux, MasterDetailCrud, make_pagination
from sapl.materia.models import TipoMateriaLegislativa
from sapl.utils import (create_barcode, get_client_ip, permissoes_adm,
@@ -26,12 +24,10 @@ from .forms import (AnularProcoloAdmForm, DocumentoAcessorioAdministrativoForm,
DocumentoAdministrativoForm, ProtocoloDocumentForm,
ProtocoloFilterSet, ProtocoloMateriaForm,
TramitacaoAdmEditForm, TramitacaoAdmForm)
-from .models import (DocumentoAcessorioAdministrativo,
- DocumentoAdministrativo, Protocolo,
- StatusTramitacaoAdministrativo,
+from .models import (DocumentoAcessorioAdministrativo, DocumentoAdministrativo,
+ Protocolo, StatusTramitacaoAdministrativo,
TipoDocumentoAdministrativo, TramitacaoAdministrativo)
-
TipoDocumentoAdministrativoCrud = CrudAux.build(
TipoDocumentoAdministrativo, '')
@@ -634,4 +630,4 @@ def pesquisa_autores(request):
sort_keys=True,
ensure_ascii=False),
content_type="application/json; charset=utf-8")
-"""
\ No newline at end of file
+"""
diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py
index 6c3184b42..82fd7edf7 100644
--- a/sapl/relatorios/views.py
+++ b/sapl/relatorios/views.py
@@ -4,7 +4,7 @@ from bs4 import BeautifulSoup
from django.http import Http404, HttpResponse
from django.utils.translation import ugettext_lazy as _
-from sapl.base.models import CasaLegislativa, Autor
+from sapl.base.models import Autor, CasaLegislativa
from sapl.comissoes.models import Comissao
from sapl.materia.models import (Autoria, MateriaLegislativa, Numeracao,
Tramitacao, UnidadeTramitacao)
diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py
index dc375fff7..cf74399b5 100644
--- a/sapl/sessao/models.py
+++ b/sapl/sessao/models.py
@@ -6,8 +6,8 @@ from sapl.base.models import Autor
from sapl.materia.models import MateriaLegislativa
from sapl.parlamentares.models import (CargoMesa, Legislatura, Parlamentar,
Partido, SessaoLegislativa)
-from sapl.utils import YES_NO_CHOICES, restringe_tipos_de_arquivo_txt,\
- SaplGenericRelation
+from sapl.utils import (YES_NO_CHOICES, SaplGenericRelation,
+ restringe_tipos_de_arquivo_txt)
class CargoBancada(models.Model):
diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py
index 3f8fe93af..fbd044b51 100644
--- a/sapl/sessao/views.py
+++ b/sapl/sessao/views.py
@@ -45,7 +45,6 @@ from .models import (Bancada, Bloco, CargoBancada, CargoMesa,
SessaoPlenariaPresenca, TipoExpediente,
TipoResultadoVotacao, TipoSessaoPlenaria, VotoParlamentar)
-
TipoSessaoCrud = CrudAux.build(TipoSessaoPlenaria, 'tipo_sessao_plenaria')
TipoExpedienteCrud = CrudAux.build(TipoExpediente, 'tipo_expediente')
CargoBancadaCrud = CrudAux.build(CargoBancada, '')
diff --git a/sapl/settings.py b/sapl/settings.py
index f3030d255..7f39005b4 100644
--- a/sapl/settings.py
+++ b/sapl/settings.py
@@ -23,7 +23,6 @@ from unipath import Path
from .temp_suppress_crispy_form_warnings import \
SUPRESS_CRISPY_FORM_WARNINGS_LOGGING
-
BASE_DIR = Path(__file__).ancestor(1)
PROJECT_DIR = Path(__file__).ancestor(2)
@@ -98,7 +97,7 @@ MIDDLEWARE_CLASSES = (
REST_FRAMEWORK = {
"DEFAULT_RENDERER_CLASSES": (
"rest_framework.renderers.JSONRenderer",
- #"rest_framework.renderers.BrowsableAPIRenderer",
+ # "rest_framework.renderers.BrowsableAPIRenderer",
),
"DEFAULT_PARSER_CLASSES": (
"rest_framework.parsers.JSONParser",
diff --git a/sapl/test_urls.py b/sapl/test_urls.py
index 02be7505c..51c6f5e2e 100644
--- a/sapl/test_urls.py
+++ b/sapl/test_urls.py
@@ -1,22 +1,19 @@
+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 string_concat
-from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
-import pytest
+from django.utils.translation import string_concat
from sapl.crud.base import PermissionRequiredForAppCrudMixin
-from sapl.materia.views import recuperar_materia
from scripts.inicializa_grupos_autorizacoes import cria_grupos_permissoes
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]
diff --git a/sapl/utils.py b/sapl/utils.py
index 7029a508b..b4e6450fa 100644
--- a/sapl/utils.py
+++ b/sapl/utils.py
@@ -1,9 +1,10 @@
+import hashlib
+import logging
from datetime import date
from functools import wraps
from unicodedata import normalize as unicodedata_normalize
-import hashlib
-import logging
+import magic
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Button
from django import forms
@@ -17,11 +18,10 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied, ValidationError
from django.utils.translation import ugettext_lazy as _
from floppyforms import ClearableFileInput
+
from sapl.crispy_layout_mixin import SaplFormLayout, form_actions, to_row
-import magic
from sapl.settings import BASE_DIR
-
sapl_logger = logging.getLogger(BASE_DIR.name)
@@ -121,8 +121,10 @@ class SaplGenericRelation(GenericRelation):
)
- [ref_1]: https://docs.djangoproject.com/el/1.10/topics/db/queries/#field-lookups
- [ref_2]: https://github.com/interlegis/sapl/blob/master/sapl/parlamentares/models.py
+ [ref_1]: https://docs.djangoproject.com/el/1.10/topics/db/queries/
+ #field-lookups
+ [ref_2]: https://github.com/interlegis/sapl/blob/master/sapl/
+ parlamentares/models.py
"""
def __init__(self, to, fields_search=(), **kwargs):
@@ -136,7 +138,7 @@ class SaplGenericRelation(GenericRelation):
for field in fields_search:
# descomente para ver todas os campos que são elementos de busca
- #print(kwargs['related_query_name'], field)
+ # print(kwargs['related_query_name'], field)
assert isinstance(field, (tuple, list)), _(
'fields_search deve ser um array de tuplas ou listas.')
diff --git a/scripts/inicializa_grupos_autorizacoes.py b/scripts/inicializa_grupos_autorizacoes.py
index fe69914b1..38606b0a3 100644
--- a/scripts/inicializa_grupos_autorizacoes.py
+++ b/scripts/inicializa_grupos_autorizacoes.py
@@ -10,7 +10,6 @@ if True:
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
from django.contrib.contenttypes.models import ContentType
- from sapl.base.models import Autor
class InicializaGruposAutorizacoes():
From ff576f8cfdecc6d24860d0b2dda6919a65eb3a28 Mon Sep 17 00:00:00 2001
From: Eduardo Calil
Date: Thu, 20 Oct 2016 17:39:37 -0200
Subject: [PATCH 06/16] =?UTF-8?q?Trata=20o=20caso=20em=20que=20a=20sess?=
=?UTF-8?q?=C3=A3o=20do=20relat=C3=B3rio=20n=C3=A3o=20existe?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sapl/relatorios/views.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py
index 82fd7edf7..2900ee9a8 100644
--- a/sapl/relatorios/views.py
+++ b/sapl/relatorios/views.py
@@ -1,6 +1,8 @@
from datetime import datetime
from bs4 import BeautifulSoup
+
+from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404, HttpResponse
from django.utils.translation import ugettext_lazy as _
@@ -783,7 +785,10 @@ def relatorio_sessao_plenaria(request, pk):
rodape = get_rodape(casa)
imagem = get_imagem(casa)
- sessao = SessaoPlenaria.objects.get(id=pk)
+ try:
+ sessao = SessaoPlenaria.objects.get(id=pk)
+ except ObjectDoesNotExist:
+ raise Http404('Essa página não existe')
(inf_basicas_dic,
lst_mesa,
From 0ae9ccaa18bb8a44d434fb623d5dd6a02e32fd3a Mon Sep 17 00:00:00 2001
From: Edward Ribeiro
Date: Thu, 20 Oct 2016 17:38:41 -0200
Subject: [PATCH 07/16] =?UTF-8?q?HOT-FIX:=20conserta=20erro=20de=20convers?=
=?UTF-8?q?=C3=A3o=20(iso=20->=20unicode)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sapl/relatorios/templates/pdf_espelho_preparar_pysc.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sapl/relatorios/templates/pdf_espelho_preparar_pysc.py b/sapl/relatorios/templates/pdf_espelho_preparar_pysc.py
index 6dc4a8662..425d8db0c 100644
--- a/sapl/relatorios/templates/pdf_espelho_preparar_pysc.py
+++ b/sapl/relatorios/templates/pdf_espelho_preparar_pysc.py
@@ -60,7 +60,7 @@ if REQUEST.txt_check=='1':
REQUEST=context.REQUEST
for materia in context.zsql.materia_obter_zsql(cod_materia=cod_mat):
dic={}
- dic['titulo']="INDICAÃÃO: "+str(materia.num_ident_basica)+" "+str(materia.ano_ident_basica)
+ dic['titulo']="INDICAÇÃO: "+str(materia.num_ident_basica)+" "+str(materia.ano_ident_basica)
dic['materia']=str(materia.num_ident_basica)+"/"+str(materia.ano_ident_basica)
dic['dat_apresentacao']=materia.dat_apresentacao
dic['txt_ementa']=materia.txt_ementa
From f6706a8898c5d2a7a1a235305d25fa270bd28888 Mon Sep 17 00:00:00 2001
From: Edward
Date: Thu, 20 Oct 2016 17:52:12 -0200
Subject: [PATCH 08/16] =?UTF-8?q?Apagando=20arquivo=20desnecess=C3=A1rio?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Remove 'echo'.
---
echo | 14029 ---------------------------------------------------------
1 file changed, 14029 deletions(-)
delete mode 100644 echo
diff --git a/echo b/echo
deleted file mode 100644
index 7a95a6562..000000000
--- a/echo
+++ /dev/null
@@ -1,14029 +0,0 @@
-]0;IPython: Documents/saplVIRTUAL_ENV -> /home/eduardo/.virtualenvs/sapl/lib/python3.4/site-packages
-============================= test session starts ==============================
-platform linux -- Python 3.4.3, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
-django settings: sapl.settings (from ini file)
-rootdir: /home/eduardo/Documents/sapl, inifile: pytest.ini
-plugins: cov-2.3.0, django-2.9.1, ipdb-0.1-prerelease2
-collected 2013 items
-
-sapl/test_urls.py .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F....F....F....F....F....F.........F....F....F....F....F....F....F....F.........F....F....F....F....F....F....F....F....F....F....F....F....F....F....F....F....F....F....F...........F....F....F....F....F..............................................................................FFFFFFFFFFFFFFFFFFF................................................................................................................................................................................................................................................................................................................................................................................................................FFFFFFFFFF.............................................................FFFFFF.FFF.FFFFFFFFFFFFFFFFFFFFFFF..F
-
-=================================== FAILURES ===================================
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item238] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050365a60>, 'sistema/app-config/', [], 'sapl.base')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item243] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04ec17bf8>, 'sistema/bancada/', [], 'sapl.sessao')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item248] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04ec17ea0>, 'sistema/bloco/', [], 'sapl.sessao')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item253] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04ec201e0>, 'sistema/cargo-bancada/', [], 'sapl.sessao')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item258] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc0503657b8>, 'sistema/casa-legislativa/', [], 'sapl.base')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item263] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9c6620>, 'sistema/coligacao/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item273] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc05036cb70>, 'sistema/comissao/cargo/', [], 'sapl.comissoes')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item278] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc05036ce18>, 'sistema/comissao/periodo-composicao/', [], 'sapl.comissoes')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item283] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050378158>, 'sistema/comissao/tipo/', [], 'sapl.comissoes')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item288] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9c6b70>, 'sistema/frente/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item293] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc0502df488>, 'sistema/lexml/provedor/', [], 'sapl.lexml')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item298] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc0502df730>, 'sistema/lexml/publicador/', [], 'sapl.lexml')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item303] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9f0bf8>, 'sistema/materia/autor/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item308] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9f91e0>, 'sistema/materia/orgao/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item318] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9e5b70>, 'sistema/materia/regime-tramitacao/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item323] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9f0ea0>, 'sistema/materia/status-tramitacao/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item328] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9e5e18>, 'sistema/materia/tipo-autor/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item333] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9f0158>, 'sistema/materia/tipo-documento/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item338] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9f0400>, 'sistema/materia/tipo-fim-relatoria/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item343] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9e58c8>, 'sistema/materia/tipo/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item348] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9f06a8>, 'sistema/materia/unidade-tramitacao/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item353] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9d91e0>, 'sistema/mesa-diretora/cargo-mesa/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item358] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9cfea0>, 'sistema/mesa-diretora/sessao-legislativa/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item363] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9fd510>, 'sistema/norma/assunto/', [], 'sapl.norma')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item368] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9fd268>, 'sistema/norma/tipo/', [], 'sapl.norma')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item373] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9c6e18>, 'sistema/parlamentar/legislatura/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item378] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9cf400>, 'sistema/parlamentar/nivel-instrucao/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item383] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9cfbf8>, 'sistema/parlamentar/partido/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item388] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9cf6a8>, 'sistema/parlamentar/tipo-afastamento/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item393] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9cf158>, 'sistema/parlamentar/tipo-dependente/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item398] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9cf950>, 'sistema/parlamentar/tipo-militar/', [], 'sapl.parlamentares')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item403] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9e5620>, 'sistema/proposicao/autor/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item408] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9e5378>, 'sistema/proposicao/tipo/', [], 'sapl.materia')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item420] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04ec17950>, 'sistema/sessao-plenaria/tipo-expediente/', [], 'sapl.sessao')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item425] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04ec176a8>, 'sistema/sessao-plenaria/tipo-resultado-votacao/', [], 'sapl.sessao')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item430] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04ec17400>, 'sistema/sessao-plenaria/tipo/', [], 'sapl.sessao')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item435] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e400>, 'sistema/status-tramitacao-adm/', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-________ test_crudaux_list_do_crud_esta_na_pagina_sistema[url_item440] _________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e158>, 'sistema/tipo-documento-adm/', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_crudaux_list_do_crud_esta_na_pagina_sistema(url_item, admin_client):
-
- # Verifica a url é de um CrudAux e, se for, testa se está
- # na página Tabelas Auxiliares
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- view_class = None
- if hasattr(key, 'view_class'):
- view_class = key.view_class
-
- # se não tem view_class, possivelmente não é uma classed base view
- if not view_class:
- return
-
- # se não tem atributo crud, não é será nenhum tipo de crud
- if not hasattr(view_class, 'crud'):
- return
-
- herancas_crud = list(map(str, type.mro(view_class.crud)))
- for string_class in herancas_crud:
- if 'CrudAux' in string_class:
-
- herancas_view = list(map(str, type.mro(view_class)))
-
- for string_view_class in herancas_view:
- # verifica se o link para manutenção do crud está em /sistema
- if 'ListView' in string_view_class:
-> response = admin_client.get('/sistema', {}, follow=True)
-
-sapl/test_urls.py:141:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
-_________________________ test_urlpatterns[url_item16] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9d9510>, 'docadm/', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item17] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f98fd90>, 'docadm/%(pk)s', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item18] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f98fea0>, 'docadm/%(pk)s/delete', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/1/delete) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item19] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f98fe18>, 'docadm/%(pk)s/edit', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/1/edit) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item20] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f9d97b8>, 'docadm/create', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/create) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item21] _________________________
-
-url_item = (, 'docadm/doc-ace-adm/%(pk)s', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-ace-adm/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item22] _________________________
-
-url_item = (, 'docadm/doc-ace-adm/edit/%(pk)s/%(ano)s', ['pk', 'ano'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-ace-adm/edit/1/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item23] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f98ff28>, 'docadm/doc-acessorio/', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-acessorio/) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item24] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc0502800d0>, 'docadm/doc-acessorio/%(pk)s', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-acessorio/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item25] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc0502801e0>, 'docadm/doc-acessorio/%(pk)s/delete', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-acessorio/1/delete) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item26] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050280158>, 'docadm/doc-acessorio/%(pk)s/edit', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-acessorio/1/edit) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item27] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050280048>, 'docadm/doc-acessorio/create', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-acessorio/create) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item28] _________________________
-
-url_item = (, 'docadm/doc-adm/%(pk)s', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/doc-adm/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item29] _________________________
-
-url_item = (, 'docadm/pesq-doc-adm', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/pesq-doc-adm) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item30] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050280268>, 'docadm/tramitacao-doc-adm/%(pk)s/tramitacaoadministrativo', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/tramitacao-doc-adm/1/tramitacaoadministrativo) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item31] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc0502802f0>, 'docadm/tramitacao-doc-adm/%(pk)s/tramitacaoadministrativo/create', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/tramitacao-doc-adm/1/tramitacaoadministrativo/create) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item32] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050280378>, 'docadm/tramitacao-doc-adm/tramitacaoadministrativo/%(pk)s', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/tramitacao-doc-adm/tramitacaoadministrativo/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item33] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050280488>, 'docadm/tramitacao-doc-adm/tramitacaoadministrativo/%(pk)s/delete', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/tramitacao-doc-adm/tramitacaoadministrativo/1/delete) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-_________________________ test_urlpatterns[url_item34] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc050280400>, 'docadm/tramitacao-doc-adm/tramitacaoadministrativo/%(pk)s/edit', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/docadm/tramitacao-doc-adm/tramitacaoadministrativo/1/edit) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item435] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e400>, 'sistema/status-tramitacao-adm/', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/status-tramitacao-adm/) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item436] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e510>, 'sistema/status-tramitacao-adm/%(pk)s', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/status-tramitacao-adm/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item437] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e620>, 'sistema/status-tramitacao-adm/%(pk)s/delete', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/status-tramitacao-adm/1/delete) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item438] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e598>, 'sistema/status-tramitacao-adm/%(pk)s/edit', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/status-tramitacao-adm/1/edit) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item439] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e488>, 'sistema/status-tramitacao-adm/create', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/status-tramitacao-adm/create) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item440] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e158>, 'sistema/tipo-documento-adm/', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/tipo-documento-adm/) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item441] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e268>, 'sistema/tipo-documento-adm/%(pk)s', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/tipo-documento-adm/1) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item442] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e378>, 'sistema/tipo-documento-adm/%(pk)s/delete', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/tipo-documento-adm/1/delete) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item443] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e2f0>, 'sistema/tipo-documento-adm/%(pk)s/edit', ['pk'], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/tipo-documento-adm/1/edit) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-________________________ test_urlpatterns[url_item444] _________________________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc04f91e1e0>, 'sistema/tipo-documento-adm/create', [], 'sapl.protocoloadm')
-admin_client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_urlpatterns(url_item, admin_client):
-
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- assert '\n' not in url, """
- A url (%s) da app (%s) está mal formada.
- """ % (app_name, url)
-
- app_name = app_name[5:]
-
- assert app_name in apps_url_patterns_prefixs_and_users, """
- A app (%s) da url (%s) não consta na lista de prefixos do teste
- """ % (app_name, url)
-
- if app_name in apps_url_patterns_prefixs_and_users:
- prefixs = apps_url_patterns_prefixs_and_users[app_name]['prefixs']
-
- isvalid = False
- for prefix in prefixs:
- if url.startswith(prefix):
- isvalid = True
- break
-
-> assert isvalid, """
- O prefixo da url (%s) não está no padrão de sua app (%s).
- Os prefixos permitidos são:
- %s
- """ % (url, app_name, prefixs)
-E AssertionError:
-E O prefixo da url (/sistema/tipo-documento-adm/create) não está no padrão de sua app (protocoloadm).
-E Os prefixos permitidos são:
-E ['/protocoloadm', '/docadm/sistema']
-E
-E assert False
-
-sapl/test_urls.py:254: AssertionError
-______________ test_permissions_urls_for_users_by_apps[url_item3] ______________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc05036c620>, 'comissao/%(pk)s/composicao/create', ['pk'], 'sapl.comissoes')
-client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_permissions_urls_for_users_by_apps(url_item, client):
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- if not get_user_model().objects.exists():
- for app in sapl_appconfs:
- # readequa permissões dos models adicionando
- # list e detail permissions
- create_perms_post_migrate(app)
- # cria usuários de perfil do sapl
- cria_grupos_permissoes()
- users = get_user_model().objects.values_list('username', flat=True)
-
- app_labels = app_name.split('.')[1]
-
- view = None
- if hasattr(key, 'view_class'):
- view = key.view_class()
-
- """
- A classe PermissionRequiredForAppCrudMixin pode ser usada em uma
- app mas envolver permissoes para outras
- como é o caso de PainelView que está na app 'sessao'
- mas é um redirecionamento para 'painel'... aqui é feita
- a troca da app a ser testada, por essas outras possíveis.
-
- Este, até a ultima versão deste teste é o único tipo de view que
- possui restrição restrição simples, por permissão, e não por
- container, como é o caso de proposições que possui restrição
- por usuário e não só por, ou não tem, o campo permission_required
- """
- if PermissionRequiredForAppCrudMixin in type.mro(key.view_class):
- # essa classe deve informar app_label
- assert hasattr(key.view_class, 'app_label')
- # app_label deve ter conteudo
- assert key.view_class.app_label
- app_labels = key.view_class.app_label
- else:
-
- if hasattr(view, 'permission_required') and \
- view.permission_required is not None and\
- len(view.permission_required) == 0:
- """
- condição do Crud, se tem permission_required e ele é igual [],
- então é uma view pública, teste liberado.
- """
- return
- else:
- """
- Views que não se encaixam nãs condições acima, podem possuir
- ou não restrição de acesso. Se o código continuar,
- será tratado como tentativa de validar pois é possível
- ter restrição local, como uma anotação method_required.
- Caberá ao desenvolvedor de uma nova view, se for pública e
- sem necessidade de nenhum tratamento de permissão, para limpar
- o teste to py.test adicionar sua url
- representativa na variavel externa ao teste:
-
- urls_publicas_excecoes, logo acima do teste
- """
- pass
-
- if isinstance(app_labels, str):
- app_labels = app_labels,
-
- for app in app_labels:
-
- assert app in apps_url_patterns_prefixs_and_users, """
- O app_label (%s) associado a url (%s) não está na base de testes.
- %s
- """ % (app_name, url)
-
- if 'users' not in apps_url_patterns_prefixs_and_users[app]:
- continue
-
- users_for_url_atual_app = apps_url_patterns_prefixs_and_users[
- app]['users']
-
- for username in users:
- print(username, users_for_url_atual_app, url)
-
- client.login(username=username, password='interlegis')
-
- rg = None
- try:
- if url not in urls_publicas_excecoes['get']:
- rg = client.get(url, {}, follow=True)
- except:
- pass
-
- rp = None
- try:
- if url not in urls_publicas_excecoes['post']:
- rp = client.post(url, {}, follow=True)
- except:
- pass
-
- """
- devido às urls serem incompletas ou com pks e outras valores
- inexistentes na base, iniciar a execução da view, seja por get,
- post ou qualquer outro método pode causar o erro...
- por isso o "try ... except" acima.
- No entanto, o objetivo do teste é validar o acesso de toda url.
- Independente do erro que vá acontecer, esse erro não ocorrerá
- se o user não tiver permissão de acesso pelo fato de que "AS
- VIEWS BEM FORMADAS PARA VALIDAÇÃO DE ACESSO DEVEM SEMPRE
- REDIRECIONAR PARA
- LOGIN ANTES DE SUA EXECUÇÃO", desta forma nunca gerando erro
- interno dada qualquer incoerência de parâmetros nas urls
- """
-
- for _type, content in (
- ('get', str(rg.content if rg else '')),
- ('post', str(rp.content if rp else ''))):
-
- if not content:
- continue
-
- def _assert_login(_in):
- if _in:
- assert btn_login in content, """
- No teste de requisição "%s" a url (%s).
- App (%s)
- O usuário (%s) deveria ser redirecionado
- para tela de login.
- """ % (_type, url, app, username)
- else:
- assert btn_login not in content, """
- No teste de requisição "%s" a url (%s).
- App (%s)
- O usuário (%s) não deveria ser redirecionado
- para tela de login. Se essa é uma url
- invariavelmente pública, a adicione na variavel
- abaixo localizada no arquivo que se encontra este
- teste:
-
- urls_publicas_excecoes
-
-
- """ % (_type, url, app, username)
-
- if username not in users_for_url_atual_app:
- # se não é usuário da app deve ser redirecionado para login
- _assert_login(True)
- else:
- prefixs = users_for_url_atual_app[username]
- for pr in prefixs:
- if url.startswith(pr):
- _assert_login(False)
- break
-
-> client.get('/logout/', follow=True)
-
-sapl/test_urls.py:473:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:123: in get_response
- response = middleware_method(request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/middleware/locale.py:25: in process_request
- request, check_path=self.is_language_prefix_patterns_used)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/translation/__init__.py:199: in get_language_from_request
- return _trans.get_language_from_request(request, check_path)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/translation/trans_real.py:494: in get_language_from_request
- lang_code = request.session.get(LANGUAGE_SESSION_KEY)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/contrib/sessions/backends/base.py:61: in get
- return self._session.get(key, default)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/contrib/sessions/backends/base.py:201: in _get_session
- self._session_cache = self.load()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/contrib/sessions/backends/db.py:33: in load
- expire_date__gt=timezone.now()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:381: in get
- num = len(clone)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:240: in __len__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."session_key" = %s AND "django_session"."expire_date" > %s)'
-params = ('7bpa3uesppy7ns1gsx9sm5lcsnyo5hn3', datetime.datetime(2016, 10, 11, 14, 15, 15, 423886, tzinfo=))
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.InternalError: current transaction is aborted, commands ignored until end of transaction block
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: InternalError
------------------------------ Captured stdout call -----------------------------
-operador_administrativo {'operador_comissoes': ['/comissao'], 'operador_geral': ['/sistema', '/comissao']} /comissao/1/composicao/create
-______________ test_permissions_urls_for_users_by_apps[url_item4] ______________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc05036c510>, 'comissao/%(pk)s/delete', ['pk'], 'sapl.comissoes')
-client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_permissions_urls_for_users_by_apps(url_item, client):
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- if not get_user_model().objects.exists():
- for app in sapl_appconfs:
- # readequa permissões dos models adicionando
- # list e detail permissions
- create_perms_post_migrate(app)
- # cria usuários de perfil do sapl
- cria_grupos_permissoes()
- users = get_user_model().objects.values_list('username', flat=True)
-
- app_labels = app_name.split('.')[1]
-
- view = None
- if hasattr(key, 'view_class'):
- view = key.view_class()
-
- """
- A classe PermissionRequiredForAppCrudMixin pode ser usada em uma
- app mas envolver permissoes para outras
- como é o caso de PainelView que está na app 'sessao'
- mas é um redirecionamento para 'painel'... aqui é feita
- a troca da app a ser testada, por essas outras possíveis.
-
- Este, até a ultima versão deste teste é o único tipo de view que
- possui restrição restrição simples, por permissão, e não por
- container, como é o caso de proposições que possui restrição
- por usuário e não só por, ou não tem, o campo permission_required
- """
- if PermissionRequiredForAppCrudMixin in type.mro(key.view_class):
- # essa classe deve informar app_label
- assert hasattr(key.view_class, 'app_label')
- # app_label deve ter conteudo
- assert key.view_class.app_label
- app_labels = key.view_class.app_label
- else:
-
- if hasattr(view, 'permission_required') and \
- view.permission_required is not None and\
- len(view.permission_required) == 0:
- """
- condição do Crud, se tem permission_required e ele é igual [],
- então é uma view pública, teste liberado.
- """
- return
- else:
- """
- Views que não se encaixam nãs condições acima, podem possuir
- ou não restrição de acesso. Se o código continuar,
- será tratado como tentativa de validar pois é possível
- ter restrição local, como uma anotação method_required.
- Caberá ao desenvolvedor de uma nova view, se for pública e
- sem necessidade de nenhum tratamento de permissão, para limpar
- o teste to py.test adicionar sua url
- representativa na variavel externa ao teste:
-
- urls_publicas_excecoes, logo acima do teste
- """
- pass
-
- if isinstance(app_labels, str):
- app_labels = app_labels,
-
- for app in app_labels:
-
- assert app in apps_url_patterns_prefixs_and_users, """
- O app_label (%s) associado a url (%s) não está na base de testes.
- %s
- """ % (app_name, url)
-
- if 'users' not in apps_url_patterns_prefixs_and_users[app]:
- continue
-
- users_for_url_atual_app = apps_url_patterns_prefixs_and_users[
- app]['users']
-
- for username in users:
- print(username, users_for_url_atual_app, url)
-
- client.login(username=username, password='interlegis')
-
- rg = None
- try:
- if url not in urls_publicas_excecoes['get']:
- rg = client.get(url, {}, follow=True)
- except:
- pass
-
- rp = None
- try:
- if url not in urls_publicas_excecoes['post']:
- rp = client.post(url, {}, follow=True)
- except:
- pass
-
- """
- devido às urls serem incompletas ou com pks e outras valores
- inexistentes na base, iniciar a execução da view, seja por get,
- post ou qualquer outro método pode causar o erro...
- por isso o "try ... except" acima.
- No entanto, o objetivo do teste é validar o acesso de toda url.
- Independente do erro que vá acontecer, esse erro não ocorrerá
- se o user não tiver permissão de acesso pelo fato de que "AS
- VIEWS BEM FORMADAS PARA VALIDAÇÃO DE ACESSO DEVEM SEMPRE
- REDIRECIONAR PARA
- LOGIN ANTES DE SUA EXECUÇÃO", desta forma nunca gerando erro
- interno dada qualquer incoerência de parâmetros nas urls
- """
-
- for _type, content in (
- ('get', str(rg.content if rg else '')),
- ('post', str(rp.content if rp else ''))):
-
- if not content:
- continue
-
- def _assert_login(_in):
- if _in:
- assert btn_login in content, """
- No teste de requisição "%s" a url (%s).
- App (%s)
- O usuário (%s) deveria ser redirecionado
- para tela de login.
- """ % (_type, url, app, username)
- else:
- assert btn_login not in content, """
- No teste de requisição "%s" a url (%s).
- App (%s)
- O usuário (%s) não deveria ser redirecionado
- para tela de login. Se essa é uma url
- invariavelmente pública, a adicione na variavel
- abaixo localizada no arquivo que se encontra este
- teste:
-
- urls_publicas_excecoes
-
-
- """ % (_type, url, app, username)
-
- if username not in users_for_url_atual_app:
- # se não é usuário da app deve ser redirecionado para login
- _assert_login(True)
- else:
- prefixs = users_for_url_atual_app[username]
- for pr in prefixs:
- if url.startswith(pr):
- _assert_login(False)
- break
-
-> client.get('/logout/', follow=True)
-
-sapl/test_urls.py:473:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:505: in get
- response = self._handle_redirects(response, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:686: in _handle_redirects
- response = self.get(path, QueryDict(url.query), follow=False, **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:174: in get_response
- response = self.process_exception_by_middleware(e, request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:172: in get_response
- response = response.render()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:160: in render
- self.content = self.rendered_content
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/response.py:137: in rendered_content
- content = template.render(context, self._request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/backends/django.py:95: in render
- return self.template.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:206: in render
- return self._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:173: in render
- return compiled_parent._render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/utils.py:92: in instrumented_test_render
- return self.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/loader_tags.py:69: in render
- result = block.nodelist.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:992: in render
- bit = node.render_annotated(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:959: in render_annotated
- return self.render(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:319: in render
- match = condition.eval(context)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/defaulttags.py:951: in eval
- return self.value.resolve(context, ignore_failures=True)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/template/base.py:736: in resolve
- new_obj = func(obj, *arg_vals)
-sapl/base/templatetags/common_tags.py:92: in get_doc_adm_template_perms
- app_config = AppConfig.objects.last()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:559: in last
- objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:258: in __iter__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "base_appconfig"."id", "base_appconfig"."documentos_administrativos", "base_appconfig"."sequencia_numeracao", ..._materia", "base_appconfig"."texto_articulado_norma" FROM "base_appconfig" ORDER BY "base_appconfig"."id" DESC LIMIT 1'
-params = ()
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.ProgrammingError: column base_appconfig.texto_articulado_proposicao does not exist
-E LINE 1: ...cia_numeracao", "base_appconfig"."painel_aberto", "base_appc...
-E ^
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: ProgrammingError
------------------------------ Captured stdout call -----------------------------
-operador_geral {'operador_comissoes': ['/comissao'], 'operador_geral': ['/sistema', '/comissao']} /comissao/1/delete
-______________ test_permissions_urls_for_users_by_apps[url_item5] ______________
-
-url_item = (._add_base..CrudViewWithBase at 0x7fc05036c488>, 'comissao/%(pk)s/edit', ['pk'], 'sapl.comissoes')
-client =
-
- @pytest.mark.parametrize('url_item', _lista_urls)
- def test_permissions_urls_for_users_by_apps(url_item, client):
- key, url, var, app_name = url_item
- url = '/' + (url % {v: 1 for v in var})
-
- if not get_user_model().objects.exists():
- for app in sapl_appconfs:
- # readequa permissões dos models adicionando
- # list e detail permissions
- create_perms_post_migrate(app)
- # cria usuários de perfil do sapl
- cria_grupos_permissoes()
- users = get_user_model().objects.values_list('username', flat=True)
-
- app_labels = app_name.split('.')[1]
-
- view = None
- if hasattr(key, 'view_class'):
- view = key.view_class()
-
- """
- A classe PermissionRequiredForAppCrudMixin pode ser usada em uma
- app mas envolver permissoes para outras
- como é o caso de PainelView que está na app 'sessao'
- mas é um redirecionamento para 'painel'... aqui é feita
- a troca da app a ser testada, por essas outras possíveis.
-
- Este, até a ultima versão deste teste é o único tipo de view que
- possui restrição restrição simples, por permissão, e não por
- container, como é o caso de proposições que possui restrição
- por usuário e não só por, ou não tem, o campo permission_required
- """
- if PermissionRequiredForAppCrudMixin in type.mro(key.view_class):
- # essa classe deve informar app_label
- assert hasattr(key.view_class, 'app_label')
- # app_label deve ter conteudo
- assert key.view_class.app_label
- app_labels = key.view_class.app_label
- else:
-
- if hasattr(view, 'permission_required') and \
- view.permission_required is not None and\
- len(view.permission_required) == 0:
- """
- condição do Crud, se tem permission_required e ele é igual [],
- então é uma view pública, teste liberado.
- """
- return
- else:
- """
- Views que não se encaixam nãs condições acima, podem possuir
- ou não restrição de acesso. Se o código continuar,
- será tratado como tentativa de validar pois é possível
- ter restrição local, como uma anotação method_required.
- Caberá ao desenvolvedor de uma nova view, se for pública e
- sem necessidade de nenhum tratamento de permissão, para limpar
- o teste to py.test adicionar sua url
- representativa na variavel externa ao teste:
-
- urls_publicas_excecoes, logo acima do teste
- """
- pass
-
- if isinstance(app_labels, str):
- app_labels = app_labels,
-
- for app in app_labels:
-
- assert app in apps_url_patterns_prefixs_and_users, """
- O app_label (%s) associado a url (%s) não está na base de testes.
- %s
- """ % (app_name, url)
-
- if 'users' not in apps_url_patterns_prefixs_and_users[app]:
- continue
-
- users_for_url_atual_app = apps_url_patterns_prefixs_and_users[
- app]['users']
-
- for username in users:
- print(username, users_for_url_atual_app, url)
-
- client.login(username=username, password='interlegis')
-
- rg = None
- try:
- if url not in urls_publicas_excecoes['get']:
- rg = client.get(url, {}, follow=True)
- except:
- pass
-
- rp = None
- try:
- if url not in urls_publicas_excecoes['post']:
- rp = client.post(url, {}, follow=True)
- except:
- pass
-
- """
- devido às urls serem incompletas ou com pks e outras valores
- inexistentes na base, iniciar a execução da view, seja por get,
- post ou qualquer outro método pode causar o erro...
- por isso o "try ... except" acima.
- No entanto, o objetivo do teste é validar o acesso de toda url.
- Independente do erro que vá acontecer, esse erro não ocorrerá
- se o user não tiver permissão de acesso pelo fato de que "AS
- VIEWS BEM FORMADAS PARA VALIDAÇÃO DE ACESSO DEVEM SEMPRE
- REDIRECIONAR PARA
- LOGIN ANTES DE SUA EXECUÇÃO", desta forma nunca gerando erro
- interno dada qualquer incoerência de parâmetros nas urls
- """
-
- for _type, content in (
- ('get', str(rg.content if rg else '')),
- ('post', str(rp.content if rp else ''))):
-
- if not content:
- continue
-
- def _assert_login(_in):
- if _in:
- assert btn_login in content, """
- No teste de requisição "%s" a url (%s).
- App (%s)
- O usuário (%s) deveria ser redirecionado
- para tela de login.
- """ % (_type, url, app, username)
- else:
- assert btn_login not in content, """
- No teste de requisição "%s" a url (%s).
- App (%s)
- O usuário (%s) não deveria ser redirecionado
- para tela de login. Se essa é uma url
- invariavelmente pública, a adicione na variavel
- abaixo localizada no arquivo que se encontra este
- teste:
-
- urls_publicas_excecoes
-
-
- """ % (_type, url, app, username)
-
- if username not in users_for_url_atual_app:
- # se não é usuário da app deve ser redirecionado para login
- _assert_login(True)
- else:
- prefixs = users_for_url_atual_app[username]
- for pr in prefixs:
- if url.startswith(pr):
- _assert_login(False)
- break
-
-> client.get('/logout/', follow=True)
-
-sapl/test_urls.py:473:
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:503: in get
- **extra)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:304: in get
- return self.generic('GET', path, secure=secure, **r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:380: in generic
- return self.request(**r)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/test/client.py:467: in request
- six.reraise(*exc_info)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:686: in reraise
- raise value
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/core/handlers/base.py:123: in get_response
- response = middleware_method(request)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/middleware/locale.py:25: in process_request
- request, check_path=self.is_language_prefix_patterns_used)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/translation/__init__.py:199: in get_language_from_request
- return _trans.get_language_from_request(request, check_path)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/translation/trans_real.py:494: in get_language_from_request
- lang_code = request.session.get(LANGUAGE_SESSION_KEY)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/contrib/sessions/backends/base.py:61: in get
- return self._session.get(key, default)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/contrib/sessions/backends/base.py:201: in _get_session
- self._session_cache = self.load()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/contrib/sessions/backends/db.py:33: in load
- expire_date__gt=timezone.now()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/manager.py:122: in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:381: in get
- num = len(clone)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:240: in __len__
- self._fetch_all()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:1074: in _fetch_all
- self._result_cache = list(self.iterator())
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/query.py:52: in __iter__
- results = compiler.execute_sql()
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/models/sql/compiler.py:848: in execute_sql
- cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: in execute
- return self.cursor.execute(sql, params)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/utils.py:95: in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/utils/six.py:685: in reraise
- raise value.with_traceback(tb)
-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-
-self =
-sql = 'SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."session_key" = %s AND "django_session"."expire_date" > %s)'
-params = ('7jt6whgolvs7ftcx9yzp2xave7o5xvnt', datetime.datetime(2016, 10, 11, 14, 15, 19, 387079, tzinfo=))
-
- def execute(self, sql, params=None):
- self.db.validate_no_broken_transaction()
- with self.db.wrap_database_errors:
- if params is None:
- return self.cursor.execute(sql)
- else:
-> return self.cursor.execute(sql, params)
-E django.db.utils.InternalError: current transaction is aborted, commands ignored until end of transaction block
-
-../../.virtualenvs/sapl/lib/python3.4/site-packages/django/db/backends/utils.py:64: InternalError
------------------------------ Captured stdout call -----------------------------
-operador_administrativo {'operador_comissoes': ['/comissao'], 'operador_geral': ['/sistema', '/comissao']} /comissao/1/edit
-______________ test_permissions_urls_for_users_by_apps[url_item6] ______________
-
-url_item = (