Python 2/3 compat for MD5 of SQS attributes

This commit is contained in:
Jack Danger Canty 2017-05-11 09:28:19 -07:00
commit 6679def702
2 changed files with 12 additions and 5 deletions

View file

@ -232,9 +232,10 @@ def test_send_message_with_attributes():
body = 'this is a test message'
message = queue.new_message(body)
BASE64_BINARY = base64.b64encode(b'binary value').decode('utf-8')
message_attributes = {
'test.attribute_name': {'data_type': 'String', 'string_value': 'attribute value'},
'test.binary_attribute': {'data_type': 'Binary', 'binary_value': base64.b64encode('binary value')},
'test.binary_attribute': {'data_type': 'Binary', 'binary_value': BASE64_BINARY},
'test.number_attribute': {'data_type': 'Number', 'string_value': 'string value'}
}
message.message_attributes = message_attributes