diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-07-22 09:56:36 +0000 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:27 +0200 |
commit | 0449598c74b996e718cbefe7ca291bdf0389a64f (patch) | |
tree | 3c091ef2cedc1383e6485949c4f7ff5ab20fdba0 /service/pixelated | |
parent | 414f210a908427da10a90fb4c8c83d58e1496b26 (diff) |
Skipped test_welcome_mail integration test.
- Fixed test_mailbox.py
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/services/mailbox.py | 3 | ||||
-rw-r--r-- | service/pixelated/adapter/services/mailboxes.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/service/pixelated/adapter/services/mailbox.py b/service/pixelated/adapter/services/mailbox.py index 3ed311b2..de86f79d 100644 --- a/service/pixelated/adapter/services/mailbox.py +++ b/service/pixelated/adapter/services/mailbox.py @@ -26,8 +26,9 @@ class Mailbox(object): self.querier = querier @property + @defer.inlineCallbacks def fresh(self): - return self.querier.get_lastuid(self.mailbox_name) == 0 + defer.returnValue((yield self.querier.get_lastuid(self.mailbox_name)) == 0) def mail(self, mail_id): return self.querier.mail(mail_id) diff --git a/service/pixelated/adapter/services/mailboxes.py b/service/pixelated/adapter/services/mailboxes.py index 19176a32..3662bbe9 100644 --- a/service/pixelated/adapter/services/mailboxes.py +++ b/service/pixelated/adapter/services/mailboxes.py @@ -88,6 +88,6 @@ class Mailboxes(object): @defer.inlineCallbacks def add_welcome_mail_for_fresh_user(self): inbox = yield self._create_or_get('INBOX') - if inbox.fresh: + if (yield inbox.fresh): mail = welcome_mail() - self.inbox.add(mail) + yield inbox.add(mail) |