Пример #1
0
def stop_server(tg_only = False):
    """Stop the server and unmount the application.  \
    Use tg_only = True to leave CherryPy running (for faster tests).
    """
    unmount()
    if not tg_only:
        if not cherrypy.engine.state in [states.STOPPED]:
            cherrypy.engine.exit()
        config.update({"cp_started" : False})

    if config.get("cp_started") and not tg_only:
       cherrypy.server.stop()
       config.update({"cp_started" : False})

    if config.get("server_started"):
        startup.stopTurboGears()
        config.update({"server_started" : False})
Пример #2
0
 def tearDown(self):
     testutil.DBTest.tearDown(self)
     startup.stopTurboGears()
     config.update({"tools.identity.on": self._identity_on})
Пример #3
0
 def tearDown(self):
     testutil.DBTest.tearDown(self)
     startup.stopTurboGears()
     config.update({'tools.identity.on': self._identity_on})