def test_stopAppServer(self): # Test that stopping the app server kills the process and remove the # PID file. LayerProcessController.setConfig() LayerProcessController.startAppServer() pid = LayerProcessController.appserver.pid pid_file = pidfile_path('launchpad', LayerProcessController.appserver_config) LayerProcessController.stopAppServer() self.assertRaises(OSError, os.kill, pid, 0) self.failIf(os.path.exists(pid_file), "PID file wasn't removed") self.failUnless(LayerProcessController.appserver is None, "appserver class attribute wasn't reset")
def test_stopAppServer(self): # Test that stopping the app server kills the process and remove the # PID file. LayerProcessController.setConfig() LayerProcessController.startAppServer() pid = LayerProcessController.appserver.pid pid_file = pidfile_path('launchpad', LayerProcessController.appserver_config) LayerProcessController.stopAppServer() self.assertRaises(OSError, os.kill, pid, 0) self.failIf(os.path.exists(pid_file), "PID file wasn't removed") self.failUnless(LayerProcessController.appserver is None, "appserver class attribute wasn't reset")
def tearDown(self): super(LayerProcessControllerTestCase, self).tearDown() # Stop both servers. It's okay if they aren't running. LayerProcessController.stopSMTPServer() LayerProcessController.stopAppServer()
def tearDown(self): super(LayerProcessControllerTestCase, self).tearDown() # Stop both servers. It's okay if they aren't running. LayerProcessController.stopSMTPServer() LayerProcessController.stopAppServer()