Skip to content

Commit

Permalink
added test cases for mailtos URL handing
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Jul 3, 2022
1 parent fcedb47 commit f4ca9f5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test_plugin_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,3 +728,16 @@ def test_plugin_email_dict_variations():
'password': 'abd123',
'host': 'example.com'}, suppress_exceptions=False)
assert isinstance(obj, plugins.NotifyEmail) is True

results = plugins.NotifyEmail.parse_url(
'mailtos://abc:password@xyz.cn:465?smtp=smtp.exmail.qq.com&mode=ssl')
assert isinstance(results, dict)
obj = Apprise.instantiate(results)
assert obj.secure_mode == 'ssl'
assert obj.smtp_host == 'smtp.exmail.qq.com'
assert obj.user == 'abc'
assert obj.password == 'password'
assert obj.host == 'xyz.cn'
assert obj.port == 465
assert obj.secure is True

0 comments on commit f4ca9f5

Please sign in to comment.