#NEWLINE# @ when ( 'we set the instance count in zookeeper for service "{service}" instance "{instance}" to {number:d}' ) #NEWLINE# def zookeeper_scale_job( context , service , instance , number ) : #NEWLINE# #INDENT# with contextlib . nested ( mock . patch . object ( SystemPaastaConfig , 'get_zk_hosts' , autospec = True , return_value = context . zk_hosts ) ) as ( _ , ) : #NEWLINE# #INDENT# set_instances_for_marathon_service ( number , instance , number , soa_dir = context . soa_dir )