Skip to content

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Mar 19, 2024
1 parent 694ec97 commit bdfb09b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions robotframework_reportportal/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def log_message(self, message: Dict) -> None:
else:
# Do not log full binary data, since it's usually corrupted
content_type = guess_content_type_from_bytes(unescape(msg.message, 128))
msg.message = (f'Binary data of type "{content_type}" logging skipped, as it was processed as text and '
'hence corrupted.')
msg.message = (f'Binary data of type "{content_type}" logging skipped, as it was processed as text and'
' hence corrupted.')
msg.level = 'WARN'
logger.debug('ReportPortal - Log Message: {0}'.format(message))
self.service.log(message=msg)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ def test_binary_file_log(mock_client_init):
assert len(calls) == 3

messages = set(map(lambda x: x[1]['message'], calls))
error_message = 'Binary data of type "image/jpeg" logging skipped, as it was processed as text and hence corrupted.'
assert error_message in messages
error_msg = 'Binary data of type "image/jpeg" logging skipped, as it was processed as text and hence corrupted.'
assert error_msg in messages

0 comments on commit bdfb09b

Please sign in to comment.