From b08f537c400d2b07947a6a14e71aba8e3e24951c Mon Sep 17 00:00:00 2001 From: AlGouvea Date: Fri, 25 Jun 2021 09:58:28 -0300 Subject: [PATCH] =?UTF-8?q?Iniciada=20a=20fun=C3=A7=C3=A3o=20de=20teste?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/api/test_api.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sapl/api/test_api.py b/sapl/api/test_api.py index cf1cf686d..e6ab07da9 100644 --- a/sapl/api/test_api.py +++ b/sapl/api/test_api.py @@ -4,3 +4,21 @@ import pytest from sapl.parlamentares.models import Legislatura, ComposicaoMesa, Parlamentar,\ SessaoLegislativa, CargoMesa +@pytest.mark.django_db(transaction=False) +def test_get_mesa_diretora(): + #criar legislatura, sessao e parlamentares + parlamentar = baker.make(Parlamentar, nome_parlamentar='Joseph Joestar', id=8) + + legislatura = baker.make(Legislatura, id=34) + + sessao = baker.make(SessaoLegislativa, legislatura=legislatura) + + cargo = baker.make(CargoMesa, descricao="presidente") + + #passar informações para a composicao_mesa + mesa = baker.make(ComposicaoMesa, parlamentar=parlamentar, + sessao_legislativa=sessao, cargo=cargo) + + print(mesa.cargo) + + #checagens \ No newline at end of file