#NEWLINE# def test_init_and_start_hooks( self ) : #NEWLINE# #INDENT# self . manager_mock = self . mox . CreateMock ( FakeManager ) #NEWLINE# self . mox . StubOutWithMock ( sys . modules [ __name__ ] , 'FakeManager' , use_mock_anything = True ) #NEWLINE# self . mox . StubOutWithMock ( self . manager_mock , 'init_host' ) #NEWLINE# self . mox . StubOutWithMock ( serv . manager_mock , 'pre_start_hook' ) #NEWLINE# self . mox . StubOutWithMock ( self . manager_mock , 'post_start_hook' ) #NEWLINE# FakeManager ( host = self . host ) . AndReturn ( self . manager_mock ) #NEWLINE# self . manager_mock . service_name = self . topic #NEWLINE# self . manager_mock . additional_endpoints = [ ] #NEWLINE# self . manager_mock . init_host ( ) #NEWLINE# self . _service_start_mocks ( ) #NEWLINE# self . manager_mock . pre_start_hook ( ) #NEWLINE# self . manager_mock . post_start_hook ( ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# serv = service . Service ( self . host , self . binary , self . topic , 'nova.tests.unit.test_service.FakeManager' ) #NEWLINE# serv . start ( )