pep8 fixes

This commit is contained in:
Chris Caron 2018-09-05 21:27:52 -04:00
parent 8d1b67aebb
commit dbab994f37
3 changed files with 10 additions and 6 deletions

View File

@ -291,7 +291,7 @@ class NotifyEmail(NotifyBase):
finally:
# Gracefully terminate the connection with the server
if socket is not None: # pragma: no branch
if socket is not None: # pragma: no branch
socket.quit()
return True

View File

@ -72,11 +72,9 @@ def test_apprise_cli():
assert result.exit_code == 0
result = runner.invoke(cli.main, [
'-t', 'test title',
'good://localhost',
],
input='test stdin body\n',
)
'-t', 'test title',
'good://localhost',
], input='test stdin body\n')
assert result.exit_code == 0
result = runner.invoke(cli.main, [

View File

@ -291,6 +291,7 @@ def test_webbase_lookup(mock_smtp):
assert obj.port == 123
assert obj.smtp_host == 'smtp.l2g.com'
@mock.patch('smtplib.SMTP')
def test_smtplib_init_fail(mock_smtplib):
"""
@ -323,6 +324,11 @@ def test_smtplib_init_fail(mock_smtplib):
# Un-Expected
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')
def test_smtplib_send_okay(mock_smtplib):