#NEWLINE# def test_filter_num_instances_fails( self ) : #NEWLINE# #INDENT# self . flags ( max_instances_per_host = 5 ) #NEWLINE# self . filt_cls = num_instances_filter . NumInstancesFilter ( ) #NEWLINE# host = fakes . FakeHostState ( 'host1' , 'node1' , { #NEWLINE# #INDENT# 'num_instances' : 5 , #NEWLINE# #UNINDENT# } ) #NEWLINE# spec_obj = objects . RequestSpec ( ) #NEWLINE# self . assertFalse ( self . filt_cls . host_passes ( host , spec_obj ) )