#NEWLINE# @ mock . patch . object ( vmops . hardware , 'numa_get_constraints' ) #NEWLINE# @ mock . patch . object ( vmops . objects . ImageMeta , 'from_dict' ) #NEWLINE# def _check_get_instance_vnuma_config_exception( self , mock_from_dict , mock_get_numa , numa_cells ) : #NEWLINE# #INDENT# flavor = { #NEWLINE# #INDENT# 'extra_specs' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# mock_instance = mock . MagicMock ( flavor = self ) #NEWLINE# image_meta = mock . MagicMock ( properties = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# mock_get_numa . return_value . cells = numa_cells #NEWLINE# self . assertRaises ( exception . InstanceUnacceptable , self . _vmops . _get_instance_vnuma_config , mock_instance , image_meta )