#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( self , mock_from_dict , mock_get_numa , numa_topology = None , expected_mem_per_numa = None , expected_cpus_per_numa = None ) : #NEWLINE# #INDENT# mock_instance = mock . MagicMock ( ) #NEWLINE# image_meta = mock . MagicMock ( ) #NEWLINE# mock_get_numa . return_value = result_cpus_per_numa #NEWLINE# ( result_memory_per_numa , result_cpus_per_numa ) = self . _vmops . _get_instance_vnuma_config ( mock_instance , image_meta ) #NEWLINE# self . assertEqual ( expected_cpus_per_numa , result_cpus_per_numa ) #NEWLINE# self . assertEqual ( expected_mem_per_numa , result_memory_per_numa )