Skip to content

Commit

Permalink
fix test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
DGaffney committed Aug 29, 2023
1 parent 76c819e commit 3eb7947
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/lib/queue/test_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ def test_send_callback(self, mock_post):
def test_send_callback_failure(self, mock_post):
mock_post.side_effect = Exception("Request Failed!")
message_body = schemas.Message(body={"callback_url": "http://example.com", "text": "This is a test", "id": 123}, response=[1,2,3])

with self.assertLogs(level='ERROR') as cm:
self.queue_processor.send_callback(message_body)

self.assertIn("Callback fail! Failed with Request Failed! on http://example.com with body of", cm.output[0])
self.assertIn("Failed with Request Failed! on http://example.com with message of", cm.output[0])

if __name__ == '__main__':
unittest.main()

0 comments on commit 3eb7947

Please sign in to comment.