From 3ee7d73ab682d4001fd7f0ca5bb333ebc447d7cb Mon Sep 17 00:00:00 2001 From: VictorFabreF Date: Fri, 31 Aug 2018 10:19:28 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20Ajusta=20testes=20unit=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/sessao/forms.py | 4 ++-- sapl/sessao/tests/test_sessao.py | 2 +- sapl/sessao/tests/test_sessao_view.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sapl/sessao/forms.py b/sapl/sessao/forms.py index e0c5779f3..72178e97a 100644 --- a/sapl/sessao/forms.py +++ b/sapl/sessao/forms.py @@ -100,8 +100,8 @@ class SessaoPlenariaForm(ModelForm): # Condições da verificação - abertura_entre_leg = leg.data_inicio < abertura < leg.data_fim - abertura_entre_sl = sl.data_inicio < abertura < sl.data_fim + abertura_entre_leg = leg.data_inicio <= abertura <= leg.data_fim + abertura_entre_sl = sl.data_inicio <= abertura <= sl.data_fim if encerramento is not None: encerramento_entre_leg = leg.data_inicio < encerramento < leg.data_fim encerramento_entre_sl = sl.data_inicio < encerramento < sl.data_fim diff --git a/sapl/sessao/tests/test_sessao.py b/sapl/sessao/tests/test_sessao.py index d83c56e86..5b5e33fa0 100644 --- a/sapl/sessao/tests/test_sessao.py +++ b/sapl/sessao/tests/test_sessao.py @@ -37,7 +37,7 @@ def test_sessao_plenaria_form_valido(): 'numero': '1', 'tipo': str(tipo.pk), 'sessao_legislativa': str(sessao.pk), - 'data_inicio': '10/11/2017', + 'data_inicio': str(sessao.data_inicio), 'hora_inicio': '10:10', 'painel_aberto': False }) diff --git a/sapl/sessao/tests/test_sessao_view.py b/sapl/sessao/tests/test_sessao_view.py index 082652c19..17b77e8d8 100644 --- a/sapl/sessao/tests/test_sessao_view.py +++ b/sapl/sessao/tests/test_sessao_view.py @@ -18,7 +18,7 @@ def test_incluir_sessao_plenaria_submit(admin_client): 'numero': '1', 'tipo': str(tipo.pk), 'sessao_legislativa': str(sessao.pk), - 'data_inicio': '10/11/2017', + 'data_inicio': str(sessao.data_inicio), 'hora_inicio': '10:10' }, follow=True)