Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Start standardizing on dash in email template name
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Apr 3, 2017
1 parent 8eba761 commit 53b7fb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion gratipay/models/participant/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def start_email_verification(self, email, *packages):
)
if self.email_address:
self.app.email_queue.put( self
, 'verification_notice'
, 'verification-notice'
, new_email=email
, include_unsubscribe=False

Expand Down
10 changes: 5 additions & 5 deletions tests/py/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,26 +310,26 @@ def test_html_escaping(self):
def test_queueing_email_is_throttled(self):
self.app.email_queue.put(self.alice, "verification")
self.app.email_queue.put(self.alice, "branch")
self.app.email_queue.put(self.alice, "verification_notice")
self.app.email_queue.put(self.alice, "verification-notice")
raises(Throttled, self.app.email_queue.put, self.alice, "branch")

def test_only_user_initiated_messages_count_towards_throttling(self):
self.app.email_queue.put(self.alice, "verification")
self.app.email_queue.put(self.alice, "verification", _user_initiated=False)
self.app.email_queue.put(self.alice, "branch")
self.app.email_queue.put(self.alice, "branch", _user_initiated=False)
self.app.email_queue.put(self.alice, "verification_notice")
self.app.email_queue.put(self.alice, "verification_notice", _user_initiated=False)
self.app.email_queue.put(self.alice, "verification-notice")
self.app.email_queue.put(self.alice, "verification-notice", _user_initiated=False)
raises(Throttled, self.app.email_queue.put, self.alice, "branch")

def test_flushing_queue_resets_throttling(self):
self.add(self.alice, '[email protected]')
assert self.app.email_queue.flush() == 1
self.app.email_queue.put(self.alice, "verification")
self.app.email_queue.put(self.alice, "branch")
self.app.email_queue.put(self.alice, "verification_notice")
self.app.email_queue.put(self.alice, "verification-notice")
assert self.app.email_queue.flush() == 3
self.app.email_queue.put(self.alice, "verification_notice")
self.app.email_queue.put(self.alice, "verification-notice")


class FlushEmailQueue(SentEmailHarness):
Expand Down

0 comments on commit 53b7fb9

Please sign in to comment.