binary values are sent as base64-encoded strings

This commit is contained in:
Jack Danger Canty 2017-05-11 07:06:42 -07:00
parent 5e88b5d1b4
commit daba699147

View File

@ -7,6 +7,7 @@ import botocore.exceptions
from boto.exception import SQSError
from boto.sqs.message import RawMessage, Message
import base64
import requests
import sure # noqa
import time
@ -233,7 +234,7 @@ def test_send_message_with_attributes():
message = queue.new_message(body)
message_attributes = {
'test.attribute_name': {'data_type': 'String', 'string_value': 'attribute value'},
'test.binary_attribute': {'data_type': 'Binary', 'binary_value': 'binary value'},
'test.binary_attribute': {'data_type': 'Binary', 'binary_value': base64.b64encode('binary value')},
'test.number_attribute': {'data_type': 'Number', 'string_value': 'string value'}
}
message.message_attributes = message_attributes