mirror of https://github.com/caronc/apprise
pep8 fixes
parent
8d1b67aebb
commit
dbab994f37
|
@ -74,9 +74,7 @@ def test_apprise_cli():
|
||||||
result = runner.invoke(cli.main, [
|
result = runner.invoke(cli.main, [
|
||||||
'-t', 'test title',
|
'-t', 'test title',
|
||||||
'good://localhost',
|
'good://localhost',
|
||||||
],
|
], input='test stdin body\n')
|
||||||
input='test stdin body\n',
|
|
||||||
)
|
|
||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
|
|
||||||
result = runner.invoke(cli.main, [
|
result = runner.invoke(cli.main, [
|
||||||
|
|
|
@ -291,6 +291,7 @@ def test_webbase_lookup(mock_smtp):
|
||||||
assert obj.port == 123
|
assert obj.port == 123
|
||||||
assert obj.smtp_host == 'smtp.l2g.com'
|
assert obj.smtp_host == 'smtp.l2g.com'
|
||||||
|
|
||||||
|
|
||||||
@mock.patch('smtplib.SMTP')
|
@mock.patch('smtplib.SMTP')
|
||||||
def test_smtplib_init_fail(mock_smtplib):
|
def test_smtplib_init_fail(mock_smtplib):
|
||||||
"""
|
"""
|
||||||
|
@ -323,6 +324,11 @@ def test_smtplib_init_fail(mock_smtplib):
|
||||||
# Un-Expected
|
# Un-Expected
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
|
# A handled and expected exception
|
||||||
|
mock_smtplib.side_effect = smtplib.SMTPException('Test')
|
||||||
|
assert obj.notify(title='test', body='body',
|
||||||
|
notify_type=NotifyType.INFO) is False
|
||||||
|
|
||||||
|
|
||||||
@mock.patch('smtplib.SMTP')
|
@mock.patch('smtplib.SMTP')
|
||||||
def test_smtplib_send_okay(mock_smtplib):
|
def test_smtplib_send_okay(mock_smtplib):
|
||||||
|
|
Loading…
Reference in New Issue