-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: China login failure * Fixed undefined server_region --------- Co-authored-by: Mandar Patil <[email protected]>
- Loading branch information
Showing
5 changed files
with
20 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,6 @@ celerybeat.pid | |
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ENV_CONFIG_FILE_PATH=./tests/data/test_config.yaml |
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 |
---|---|---|
|
@@ -127,6 +127,16 @@ def test_send_with_username(self): | |
"Subject: icloud-docker: Two step authentication is required", | ||
instance.sendmail.mock_calls[0][2]["msg"], | ||
) | ||
self.assertNotIn("--region=", instance.sendmail.mock_calls[0][2]["msg"]) | ||
|
||
def test_send_with_region(self): | ||
"""Test for email send with region.""" | ||
username = "[email protected]" | ||
with patch("smtplib.SMTP") as smtp: | ||
notify.send(self.config, username, region="some_region") | ||
|
||
instance = smtp.return_value | ||
self.assertIn("--region=some_region", instance.sendmail.mock_calls[0][2]["msg"]) | ||
|
||
def test_send_fail(self): | ||
"""Test for failed send.""" | ||
|