forked from pythonprobr/libpythonpro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close pythonprobr#23
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.' | ||
) | ||
|
@@ -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.' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|