This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4576 from redixhumayun/master
TestNotifyParticipants uses QueuedEmailHarness
- Loading branch information
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
from gratipay.models.participant import Participant | ||
from gratipay.testing import Foobar, D,P | ||
from gratipay.testing.billing import BillingHarness, PaydayMixin | ||
from gratipay.testing.email import SentEmailHarness | ||
from gratipay.testing.email import QueuedEmailHarness | ||
|
||
|
||
class TestPayday(BillingHarness): | ||
|
@@ -616,7 +616,7 @@ def test_pt_is_happy_to_deal_the_owner_in(self): | |
assert P('picard').balance == D('200.00') | ||
|
||
|
||
class TestNotifyParticipants(SentEmailHarness, PaydayMixin): | ||
class TestNotifyParticipants(QueuedEmailHarness, PaydayMixin): | ||
|
||
def test_it_notifies_participants(self): | ||
kalel = self.make_participant('kalel', claimed_time='now', is_suspicious=False, | ||
|
@@ -633,7 +633,7 @@ def test_it_notifies_participants(self): | |
emails = self.db.one('SELECT * FROM email_queue') | ||
assert emails.spt_name == 'charge_'+status | ||
|
||
self.app.email_queue.flush() | ||
assert self.get_last_email()['to'] == 'kalel <[email protected]>' | ||
assert 'Gratiteam' in self.get_last_email()['body_text'] | ||
assert 'Gratiteam' in self.get_last_email()['body_html'] | ||
self.app.email_queue.flush() |