async def test_regression_send_message_fails_with_corrupt_connection_string( self, client, field_name, new_field_value ): limitations.only_run_test_for(client, ["node", "pythonv2"]) if not limitations.uses_shared_key_auth(client): pytest.skip("client is not using shared key auth") payload = sample_content.make_message_payload() cs_fields = connection_string.connection_string_to_dictionary( client.settings.connection_string ) cs_fields[field_name] = new_field_value await client.destroy() await client.create_from_connection_string( client.settings.transport, connection_string.dictionary_to_connection_string(cs_fields), connections.get_ca_cert(client.settings), ) with pytest.raises(Exception) as e: await client.send_event(payload) assert is_api_failure_exception(e._excinfo[1])
async def test_method_call_invoked_on_friend(self, client, friend): if limitations.uses_shared_key_auth(client): limitations.skip_test_for(client, ["pythonv2", "c"]) await run_method_call_test(source=client, destination=friend)