Exemplo n.º 1
0
 def load(filename):
     handler = ServerLifecycleHandler(filename=filename)
     result['handler'] = handler
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 4
0
 def load(filename):
     handler = result['handler'] = ServerLifecycleHandler(
         filename=filename)
     if handler.failed:
         raise RuntimeError(handler.error)
Exemplo n.º 5
0
def test_missing_filename_raises():
    with pytest.raises(ValueError):
        ServerLifecycleHandler()