#NEWLINE# def test_create_skip_scheduled_at( self ) : #NEWLINE# #INDENT# self . mox . StubOutWithMock ( db , 'instance_create' ) #NEWLINE# vals = { #NEWLINE# #INDENT# 'host' : 'foo-host' , #NEWLINE# 'memory_mb' : 128 , #NEWLINE# 'system_metadata' : { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'extra' : { #NEWLINE# #INDENT# 'vcpu_model' : None , #NEWLINE# 'numa_topology' : None , #NEWLINE# 'pci_requests' : None , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# fake_inst = fake_instance . fake_db_instance ( ** vals ) #NEWLINE# db . instance_create ( self . context , vals ) . AndReturn ( fake_inst ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# inst = objects . Instance ( context = self . context , host = 'foo-host' , memory_mb = 128 , scheduled_at = None , system_metadata = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } ) #NEWLINE# inst . create ( ) #NEWLINE# self . assertEqual ( 'foo-host' , vals . host )