def agent_service_setup(test):
 test.ca_set = get_credential_sets()[0]
 test.host = '192.0.2.5'
 test.port = 54123
 test.reactor = MemoryCoreReactor()
 test.agent_service = AgentService(reactor=test.reactor, control_service_host=test.host, control_service_port=test.port, node_credential=test.ca_set.node, ca_certificate=test.ca_set.root.credential.certificate, backend_description=LOOPBACK, api_args={})

def agent_service_setup ( test ) : test . ca_set = get_credential_sets ( ) [ 0 ] test . host = '192.0.2.5' test . port = 54123 test . reactor = MemoryCoreReactor ( ) test . agent_service = AgentService ( reactor = test . reactor , control_service_host = test . host , control_service_port = test . port , node_credential = test . ca_set . node , ca_certificate = test . ca_set . root . credential . certificate , backend_description = LOOPBACK , api_args = { } )
do some setup common to all of the agentservice test cases .