diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-12 16:45:26 -0300 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-12 18:50:20 -0300 |
commit | bf7b6aa193188c95c50cbc9d24f4be56afa6dc6f (patch) | |
tree | a7774f148defd799f2e24547fca0e22b63db681c /py-fake-service/app/adapter/mailset.py | |
parent | 27e07e05d97b577ef6b62b74ca7daebafd41db98 (diff) |
sending mails in py-fake-service
Diffstat (limited to 'py-fake-service/app/adapter/mailset.py')
-rw-r--r-- | py-fake-service/app/adapter/mailset.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/py-fake-service/app/adapter/mailset.py b/py-fake-service/app/adapter/mailset.py index 5a6f27a4..b59959a7 100644 --- a/py-fake-service/app/adapter/mailset.py +++ b/py-fake-service/app/adapter/mailset.py @@ -1,6 +1,5 @@ from mail import Mail - class MailSet: def __init__(self): @@ -31,4 +30,13 @@ class MailSet: mail.tags.append('trash') return False + def update(self, mail): + self.mails[mail.ident] = mail + + def add_draft(self, mail): + mail.ident = self.ident + self.mails[mail.ident] = mail + self.ident += 1 + return mail + |