#NEWLINE# def test_create( self ) : #NEWLINE# #INDENT# self . mox . StubOutWithMock ( db , 'compute_node_create' ) #NEWLINE# db . compute_node_create ( self . context , { #NEWLINE# #INDENT# 'service_id' : 456 , #NEWLINE# 'stats' : fake_stats_db_format , #NEWLINE# 'host_ip' : fake_host_ip , #NEWLINE# 'supported_instances' : fake_supported_hv_specs_db_format , #NEWLINE# 'uuid' : uuidsentinel . fake_compute_node , #NEWLINE# #UNINDENT# } ) . AndReturn ( fake_compute_node ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# compute = compute_node . ComputeNode ( context = self . context ) #NEWLINE# compute . service_id = 456 #NEWLINE# compute . uuid = uuidsentinel . fake_compute_node #NEWLINE# compute . stats = fake_stats #NEWLINE# compute . host_ip = fake_host_ip #NEWLINE# compute . supported_hv_specs = fake_supported_hv_specs #NEWLINE# with mock . patch ( 'oslo_utils.uuidutils.generate_uuid' ) as mock_gu : #NEWLINE# #INDENT# compute . create ( ) #NEWLINE# self . assertFalse ( mock_gu . called ) #NEWLINE# #UNINDENT# self . compare_obj ( mock_gu , fake_compute_node , subs = self . subs ( ) , comparators = self . comparators ( ) )