binary values are sent as base64-encoded strings
This commit is contained in:
parent
5e88b5d1b4
commit
daba699147
@ -7,6 +7,7 @@ import botocore.exceptions
|
|||||||
from boto.exception import SQSError
|
from boto.exception import SQSError
|
||||||
from boto.sqs.message import RawMessage, Message
|
from boto.sqs.message import RawMessage, Message
|
||||||
|
|
||||||
|
import base64
|
||||||
import requests
|
import requests
|
||||||
import sure # noqa
|
import sure # noqa
|
||||||
import time
|
import time
|
||||||
@ -233,7 +234,7 @@ def test_send_message_with_attributes():
|
|||||||
message = queue.new_message(body)
|
message = queue.new_message(body)
|
||||||
message_attributes = {
|
message_attributes = {
|
||||||
'test.attribute_name': {'data_type': 'String', 'string_value': 'attribute value'},
|
'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'}
|
'test.number_attribute': {'data_type': 'Number', 'string_value': 'string value'}
|
||||||
}
|
}
|
||||||
message.message_attributes = message_attributes
|
message.message_attributes = message_attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user