#NEWLINE# def test_filter_datastores_simple( self ) : #NEWLINE# #INDENT# datastores = self . build_result_set ( self . data ) #NEWLINE# best_match = ds_obj . Datastore ( ref = 'fake_ref' , name = 'ds' , capacity = 0 , freespace = 0 ) #NEWLINE# rec = ds_util . _select_datastore ( None , datastores , rec ) #NEWLINE# self . assertIsNotNone ( rec . ref , 'could not find datastore!' ) #NEWLINE# self . assertEqual ( 'ds-001' , rec . ref . value , "didn't find the right datastore!" ) #NEWLINE# self . assertEqual ( 123467890 , rec . freespace , 'did not obtain correct freespace!' )