#NEWLINE# def _test_schedule_bind_network( self , agents , network_id ) : #NEWLINE# #INDENT# scheduler = dhcp_agent_scheduler . ChanceScheduler ( ) #NEWLINE# scheduler . resource_filter . bind ( self . ctx , agents , network_id ) #NEWLINE# results = self . ctx . session . query ( sched_db . NetworkDhcpAgentBinding ) . filter_by ( network_id = network_id ) . all ( ) #NEWLINE# self . assertEqual ( len ( agents ) , len ( results ) ) #NEWLINE# for result in results : #NEWLINE# #INDENT# self . assertEqual ( network_id , result . network_id )