Skip to content

Commit 7169f89

Browse files
author
renzon
committed
Código sobre TDD e Baby Steps
1 parent a639457 commit 7169f89

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

libpythonpro/spam/__init__.py

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Enviador:
2+
def enviar(self, remetente, destinatario, assunto, corpo):
3+
return 'renzo@python.pro.br'

libpythonpro/tests/test_spam/__init__.py

Whitespace-only changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from libpythonpro.spam.enviador_de_email import Enviador
2+
3+
4+
def test_criar_enviador_de_email():
5+
enviador = Enviador()
6+
assert enviador is not None
7+
8+
9+
def test_remetente():
10+
enviador = Enviador()
11+
resultado = enviador.enviar(
12+
'renzo@python.pro.br',
13+
'luciano@python.pro.br',
14+
'Cursos Python Pro',
15+
'Primeira turma Guido Von Rossum aberta.'
16+
)
17+
assert 'renzo@python.pro.br' in resultado

0 commit comments

Comments
 (0)