#NEWLINE# def testMismatchedOsTypes( self ) : #NEWLINE# #INDENT# self . _kwargs [ 'vm_groups' ] = { ( os_type + '_group' ) : { #NEWLINE# #INDENT# 'os_type' : os_type , #NEWLINE# 'vm_spec' : _GCP_AWS_VM_CONFIG , #NEWLINE# #UNINDENT# } for os_type in ( os_types . DEBIAN , os_types . RHEL , os_types . WINDOWS ) } #NEWLINE# expected_os_types = ( os_types . JUJU , os_types . WINDOWS ) #NEWLINE# with self . assertRaises ( errors . Config . InvalidValue ) as cm : #NEWLINE# #INDENT# self . _spec_class ( _COMPONENT , expected_os_types = expected_os_types , flag_values = flags . FLAGS , ** self . _kwargs ) #NEWLINE# #UNINDENT# self . assertEqual ( str ( cm . exception ) , "VM groups in test_component may only have the following OS types: 'juju', 'windows'. The following VM group options are invalid:{sep}test_component.vm_groups['debian_group'].os_type: 'debian'{sep}test_component.vm_groups['rhel_group'].os_type: 'rhel'" . format ( sep = os . linesep ) )