Browse Source

Ajusta mais uns PEP8

pull/1464/head
Edward Ribeiro 7 years ago
parent
commit
8687b87050
  1. 4
      sapl/materia/views.py
  2. 8
      sapl/norma/tests/test_norma.py
  3. 4
      sapl/painel/views.py
  4. 2
      sapl/protocoloadm/forms.py
  5. 22
      sapl/protocoloadm/tests/test_protocoloadm.py
  6. 10
      sapl/sessao/tests/test_sessao.py

4
sapl/materia/views.py

@ -2,6 +2,7 @@ from datetime import datetime
from random import choice
from string import ascii_letters, digits
import weasyprint
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML
from django.contrib import messages
@ -12,7 +13,7 @@ from django.core.urlresolvers import reverse
from django.http import HttpResponse, JsonResponse
from django.http.response import Http404, HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect
from django.template import Context, RequestContext, loader
from django.template import RequestContext, loader
from django.utils import formats
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, ListView, TemplateView, UpdateView
@ -21,7 +22,6 @@ from django.views.generic.edit import FormView
from django_filters.views import FilterView
import sapl
import weasyprint
from sapl.base.models import Autor, CasaLegislativa
from sapl.comissoes.models import Comissao, Participacao
from sapl.compilacao.models import (STATUS_TA_IMMUTABLE_RESTRICT,

8
sapl/norma/tests/test_norma.py

@ -98,10 +98,10 @@ def test_norma_juridica_materia_inexistente():
def test_norma_juridica_materia_existente():
tipo = mommy.make(TipoNormaJuridica)
tipo_materia = mommy.make(TipoMateriaLegislativa)
materia = mommy.make(MateriaLegislativa,
numero=2,
ano=2017,
tipo=tipo_materia)
mommy.make(MateriaLegislativa,
numero=2,
ano=2017,
tipo=tipo_materia)
form = NormaJuridicaForm(data={'tipo': str(tipo.pk),
'numero': '1',

4
sapl/painel/views.py

@ -12,11 +12,11 @@ from django.utils.translation import ugettext_lazy as _
from sapl.crud.base import Crud
from sapl.painel.apps import AppConfig
from sapl.parlamentares.models import Filiacao, Votante
from sapl.parlamentares.models import Votante
from sapl.sessao.models import (ExpedienteMateria, OrdemDia, PresencaOrdemDia,
RegistroVotacao, SessaoPlenaria,
SessaoPlenariaPresenca, VotoParlamentar)
from sapl.utils import filiacao_data, get_client_ip, parlamentares_ativos
from sapl.utils import filiacao_data, get_client_ip
from .models import Cronometro

2
sapl/protocoloadm/forms.py

@ -3,7 +3,7 @@ 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
from crispy_forms.layout import HTML, Button, Fieldset, Layout
from django import forms
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db import models

22
sapl/protocoloadm/tests/test_protocoloadm.py

@ -287,7 +287,7 @@ def test_anular_protocolo_form_anula_protocolo_inexistente():
@pytest.mark.django_db(transaction=False)
def test_anular_protocolo_form_anula_protocolo_anulado():
protocolo = mommy.make(Protocolo, numero=1, ano=2017, anulado=True)
mommy.make(Protocolo, numero=1, ano=2017, anulado=True)
form = AnularProcoloAdmForm(data={'numero': '1',
'ano': '2017',
@ -304,15 +304,15 @@ def test_anular_protocolo_form_anula_protocolo_anulado():
def test_anular_protocolo_form_anula_protocolo_com_doc_vinculado():
tipo_materia = mommy.make(TipoMateriaLegislativa)
protocolo_materia = mommy.make(Protocolo,
numero=1,
ano=2017,
tipo_materia=tipo_materia,
anulado=False)
mommy.make(Protocolo,
numero=1,
ano=2017,
tipo_materia=tipo_materia,
anulado=False)
materia_legislativa = mommy.make(MateriaLegislativa,
ano=2017,
numero_protocolo=1)
mommy.make(MateriaLegislativa,
ano=2017,
numero_protocolo=1)
form = AnularProcoloAdmForm(data={'numero': '1',
'ano': '2017',
@ -333,8 +333,8 @@ def test_anular_protocolo_form_anula_protocolo_com_doc_vinculado():
tipo_documento=tipo_documento,
anulado=False)
documento_administrativo = mommy.make(DocumentoAdministrativo,
protocolo=protocolo_documento)
mommy.make(DocumentoAdministrativo,
protocolo=protocolo_documento)
form = AnularProcoloAdmForm(data={'numero': '2',
'ano': '2017',

10
sapl/sessao/tests/test_sessao.py

@ -46,11 +46,11 @@ def test_numero_duplicado_sessao_plenaria_form():
legislatura = mommy.make(Legislatura)
sessao = mommy.make(SessaoLegislativa)
tipo = mommy.make(TipoSessaoPlenaria)
sessao_plenaria = mommy.make(SessaoPlenaria,
legislatura=legislatura,
sessao_legislativa=sessao,
tipo=tipo,
numero=1)
mommy.make(SessaoPlenaria,
legislatura=legislatura,
sessao_legislativa=sessao,
tipo=tipo,
numero=1)
form = forms.SessaoPlenariaForm(data={'legislatura': str(legislatura.pk),
'numero': '1',

Loading…
Cancel
Save