From 7745392c218e847c1f022e02cf8c38668dd9befa Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Sat, 22 Nov 2014 22:48:48 -0200 Subject: [PATCH] Test cart pagination and feedback message for an everyone cart --- sigi/apps/casas/test_casas.py | 13 ++-- .../templates/parlamentares/carrinho.html | 2 +- sigi/apps/parlamentares/test_parlamentares.py | 9 +-- sigi/settings/test.py | 1 + sigi/test_cart.py | 61 ++++++++++++++++++- sigi/test_testutils.py | 18 ++++++ sigi/testutils.py | 24 ++++++++ templates/admin/carrinho.html | 2 +- 8 files changed, 118 insertions(+), 12 deletions(-) create mode 100644 sigi/test_testutils.py diff --git a/sigi/apps/casas/test_casas.py b/sigi/apps/casas/test_casas.py index 53e69b9..9e113c1 100644 --- a/sigi/apps/casas/test_casas.py +++ b/sigi/apps/casas/test_casas.py @@ -6,7 +6,12 @@ from sigi.apps.casas.models import CasaLegislativa @pytest.fixture def some_parliaments(): - a = G(CasaLegislativa, nome="Assembleia Legislativa do Amapa", foto=None, gerente_contas=None,) - b = G(CasaLegislativa, nome="Camara Municipal de Fortaleza", foto=None, gerente_contas=None,) - c = G(CasaLegislativa, nome="Camara Legislativa do Distrito Federal", foto=None, gerente_contas=None,) - return a, b, c + return parliaments_from_names([ + "Assembleia Legislativa do Amapa", + "Camara Municipal de Fortaleza", + "Camara Legislativa do Distrito Federal", + ]) + + +def parliaments_from_names(names): + return [G(CasaLegislativa, nome=name, foto=None, gerente_contas=None,) for name in names] diff --git a/sigi/apps/parlamentares/templates/parlamentares/carrinho.html b/sigi/apps/parlamentares/templates/parlamentares/carrinho.html index 0014856..8f10f18 100644 --- a/sigi/apps/parlamentares/templates/parlamentares/carrinho.html +++ b/sigi/apps/parlamentares/templates/parlamentares/carrinho.html @@ -13,7 +13,7 @@ {% block mensagem%}