-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mailjet deleted the Anymail testing account without notice. Recreating the account changed the test template id. Move the id to an environment variable to simplify changing it.
- Loading branch information
Showing
2 changed files
with
9 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
ANYMAIL_TEST_MAILJET_API_KEY = os.getenv("ANYMAIL_TEST_MAILJET_API_KEY") | ||
ANYMAIL_TEST_MAILJET_SECRET_KEY = os.getenv("ANYMAIL_TEST_MAILJET_SECRET_KEY") | ||
ANYMAIL_TEST_MAILJET_DOMAIN = os.getenv("ANYMAIL_TEST_MAILJET_DOMAIN") | ||
ANYMAIL_TEST_MAILJET_TEMPLATE_ID = os.getenv("ANYMAIL_TEST_MAILJET_TEMPLATE_ID") | ||
|
||
|
||
@tag("mailjet", "live") | ||
|
@@ -136,10 +137,15 @@ def test_merge_data(self): | |
self.assertEqual(recipient_status["[email protected]"].status, "sent") | ||
self.assertEqual(recipient_status["[email protected]"].status, "sent") | ||
|
||
@unittest.skipUnless( | ||
ANYMAIL_TEST_MAILJET_TEMPLATE_ID, | ||
"Set ANYMAIL_TEST_MAILJET_TEMPLATE_ID environment variable to run" | ||
" Mailjet stored template integration test", | ||
) | ||
def test_stored_template(self): | ||
message = AnymailMessage( | ||
# ID of the real template named 'test-template' in our Mailjet test account: | ||
template_id="176375", | ||
template_id=ANYMAIL_TEST_MAILJET_TEMPLATE_ID, | ||
to=["[email protected]"], | ||
merge_data={ | ||
"[email protected]": { | ||
|