#NEWLINE# def test_any_spec( self ) : #NEWLINE# #INDENT# cls = images . SaharaAnyValidator #NEWLINE# validator_map = images . SaharaImageValidatorBase . get_validator_map ( ) #NEWLINE# validator = cls . from_spec ( [ { #NEWLINE# #INDENT# 'package' : { #NEWLINE# #INDENT# 'java' : { #NEWLINE# #INDENT# 'version' : '8' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'package' : 'hadoop' , #NEWLINE# #UNINDENT# } ] , validator_map , [ ] ) #NEWLINE# self . assertIsInstance ( validator , cls ) #NEWLINE# self . assertEqual ( len ( validator . validators ) , 2 ) #NEWLINE# self . assertEqual ( validator . validators [ 0 ] . packages [ 0 ] . name , 'java' ) #NEWLINE# self . assertEqual ( validator . validators [ 1 ] . packages [ 0 ] . name , 'hadoop' )