Skip to content

Commit

Permalink
Acrescentada cobertura de código
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawston committed Dec 23, 2021
1 parent f2c93f2 commit 8176c07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions libpythonpro/tests/test_spam/test_enviador_de_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def test_criar_enviador_de_email():

@pytest.mark.parametrize(
'remetente',
['[email protected]', '[email protected]']
['[email protected]', '[email protected]']
)
def test_remetente(remetente):
enviador = Enviador()
resultado = enviador.enviar(
remetente,
'[email protected]',
'[email protected]',
'Cursos Python Pro',
'Primeira turma Guido Von Rossum aberta.'
)
Expand All @@ -25,14 +25,14 @@ def test_remetente(remetente):

@pytest.mark.parametrize(
'remetente',
['', 'renzo']
['', 'Rawston']
)
def test_remetente_invalido(remetente):
enviador = Enviador()
with pytest.raises(EmailInvalido):
enviador.enviar(
remetente,
'[email protected]',
'[email protected]',
'Cursos Python Pro',
'Primeira turma Guido Von Rossum aberta.'
)
6 changes: 3 additions & 3 deletions libpythonpro/tests/test_spam/test_usuarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@


def test_salvar_usuario(sessao):
usuario = Usuario(nome='Renzo', email='[email protected]')
usuario = Usuario(nome='Rawston', email='[email protected]')
sessao.salvar(usuario)
assert isinstance(usuario.id, int)


def test_listar_usuarios(sessao):
usuarios = [
Usuario(nome='Renzo', email='[email protected]'),
Usuario(nome='Luciano', email='[email protected]')
Usuario(nome='Rawston', email='[email protected]'),
Usuario(nome='Marinho', email='[email protected]')
]
for usuario in usuarios:
sessao.salvar(usuario)
Expand Down

0 comments on commit 8176c07

Please sign in to comment.