|
|
@ -1,9 +1,6 @@ |
|
|
|
import pytest |
|
|
|
from base.models import CasaLegislativa |
|
|
|
from django.core import mail |
|
|
|
from model_mommy import mommy |
|
|
|
from materia.views import load_email_templates, enviar_emails, criar_email_tramitacao |
|
|
|
from materia.models import MateriaLegislativa, TipoMateriaLegislativa |
|
|
|
|
|
|
|
from materia.views import enviar_emails, load_email_templates |
|
|
|
|
|
|
|
|
|
|
|
def test_email_template_loading(): |
|
|
@ -21,7 +18,8 @@ def test_html_email_body_with_materia(): |
|
|
|
templates = load_email_templates(['email/tramitacao.txt', |
|
|
|
'email/tramitacao.html'], |
|
|
|
{"image": 'img/logo.png', |
|
|
|
"casa_legislativa":"Assembléia Parlamentar", |
|
|
|
"casa_legislativa": |
|
|
|
"Assembléia Parlamentar", |
|
|
|
"data_registro": "25/02/2016", |
|
|
|
"cod_materia": "1", |
|
|
|
"descricao_materia": "Ementa de teste", |
|
|
@ -32,8 +30,10 @@ def test_html_email_body_with_materia(): |
|
|
|
"hash_txt": "abc01f", |
|
|
|
"materia_id": "794", |
|
|
|
"base_url": "http://localhost:8000", |
|
|
|
"materia_url": "/materia/764/acompanhar-materia", |
|
|
|
"excluir_url": "/materia/764/acompanhar-excluir",}) |
|
|
|
"materia_url": |
|
|
|
"/materia/764/acompanhar-materia", |
|
|
|
"excluir_url": |
|
|
|
"/materia/764/acompanhar-excluir"}) |
|
|
|
|
|
|
|
assert len(templates) == 2 |
|
|
|
|