mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
fix invalid logging
the first argument to ANY logger.____ function is ALWAYS cast to a
string and used as a format argument for ALL remaining arguments
using %s formatting. even `logger.exception`, which just logs as
normal and then appends the stack trace.
so we shouldn't be passing `e` into logger.exception - just
`logger.exception('something went wrong!')`
also de-duplicated a test
This commit is contained in:
@@ -98,7 +98,7 @@ def test_send_sms_raises_if_firetext_rejects(mocker, mock_firetext_client):
|
||||
assert '"code": 1' in exc.value.text
|
||||
|
||||
|
||||
def test_send_sms_raises_if_firetext_rejects(mocker, mock_firetext_client):
|
||||
def test_send_sms_raises_if_firetext_rejects_with_unexpected_data(mocker, mock_firetext_client):
|
||||
to = content = reference = 'foo'
|
||||
response_dict = {"something": "gone bad"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user