-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow custom subject delimiter (#19)
- Loading branch information
1 parent
b70c22a
commit 5792ba8
Showing
4 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
|
@@ -56,6 +56,19 @@ def test_get_subject_with_prefix(self): | |
service.SUBJECT_PREFIX = prefix | ||
service.subject = subject | ||
self.assertIn(prefix, service.get_subject()) | ||
self.assertIn(service.SUBJECT_DELIMITER, service.get_subject()) | ||
self.assertIn(subject, service.get_subject()) | ||
|
||
def test_get_subject_with_prefix_and_custom_delimiter(self): | ||
prefix = "Pony Express" | ||
custom_delimiter = " | " | ||
subject = "I am a subject!" | ||
service = BaseEmailService() | ||
service.SUBJECT_PREFIX = prefix | ||
service.SUBJECT_DELIMITER = custom_delimiter | ||
service.subject = subject | ||
self.assertIn(prefix, service.get_subject()) | ||
self.assertIn(custom_delimiter, service.get_subject()) | ||
self.assertIn(subject, service.get_subject()) | ||
|
||
@override_settings(DEFAULT_FROM_EMAIL="[email protected]") | ||
|