@@ -31,7 +31,8 @@ def test_event_hubs_simple_send(live_eventhub_config):
3131 sas_auth = authentication .SASTokenAuth .from_shared_access_key (
3232 uri , live_eventhub_config ['key_name' ], live_eventhub_config ['access_key' ])
3333 target = "amqps://{}/{}" .format (live_eventhub_config ['hostname' ], live_eventhub_config ['event_hub' ])
34- uamqp .send_message (target , msg_content , auth = sas_auth , debug = True )
34+ result = uamqp .send_message (target , msg_content , auth = sas_auth , debug = True )
35+ assert result == [uamqp .constants .MessageState .SendComplete ]
3536
3637
3738def test_event_hubs_client_send_sync (live_eventhub_config ):
@@ -45,7 +46,7 @@ def test_event_hubs_client_send_sync(live_eventhub_config):
4546 for _ in range (10 ):
4647 header = uamqp .message .MessageHeader ()
4748 header .durable = True
48- props = uamqp .message .MessageProperties (message_id = b"message id" )
49+ props = uamqp .message .MessageProperties (message_id = b"message id" , subject = "test_subject" )
4950 msg_content = b"hello world"
5051 message = uamqp .Message (
5152 msg_content ,
@@ -116,7 +117,7 @@ def data_generator():
116117 uri , live_eventhub_config ['key_name' ], live_eventhub_config ['access_key' ])
117118
118119 target = "amqps://{}/{}/Partitions/0" .format (live_eventhub_config ['hostname' ], live_eventhub_config ['event_hub' ])
119- send_client = uamqp .SendClient (target , auth = sas_auth , debug = False )
120+ send_client = uamqp .SendClient (target , auth = sas_auth , debug = True )
120121 for _ in range (10 ):
121122 message_batch = uamqp .message .BatchMessage (data_generator ())
122123 send_client .queue_message (message_batch )
@@ -134,4 +135,4 @@ def data_generator():
134135 config ['consumer_group' ] = "$Default"
135136 config ['partition' ] = "0"
136137
137- test_event_hubs_client_send_sync (config )
138+ test_event_hubs_batch_send_sync (config )
0 commit comments