示例#1
0
 def load(filename):
     handler = ServerLifecycleHandler(filename=filename)
     result['handler'] = handler
示例#2
0
 def load(filename):
     handler = ServerLifecycleHandler(filename=filename)
     handler.modify_document(doc)
     handler.on_server_loaded(None)
     handler.on_server_unloaded(None)
     handler.on_session_created(None)
     handler.on_session_destroyed(None)
     if handler.failed:
         raise RuntimeError(handler.error)
示例#3
0
 def load(filename):
     handler = ServerLifecycleHandler(filename=filename)
     handler.modify_document(doc)
     handler.on_server_loaded(None)
     handler.on_server_unloaded(None)
     handler.on_session_created(None)
     handler.on_session_destroyed(None)
     if handler.failed:
         raise RuntimeError(handler.error)
示例#4
0
 def load(filename):
     handler = result['handler'] = ServerLifecycleHandler(
         filename=filename)
     if handler.failed:
         raise RuntimeError(handler.error)
示例#5
0
def test_missing_filename_raises():
    with pytest.raises(ValueError):
        ServerLifecycleHandler()