コード例 #1
0
def fake_cloud(request):
    """Defines the testserver funcarg"""
    app = FakeCloudServer()
    server = WSGIServer(application=app,
                        ssl_context=('./tests/server.crt',
                                     './tests/server.key'))
    app.url = server.url
    server.start()
    request.addfinalizer(server.stop)
    return server
コード例 #2
0
def fake_cloud(request):
    """Defines the testserver funcarg"""
    app = FakeCloudServer()
    server = WSGIServer(
        application=app,
        ssl_context=(get_full_path("server.crt"), get_full_path("server.key")),
    )
    app.url = server.url
    server.start()
    request.addfinalizer(server.stop)
    return server
コード例 #3
0
def test_calling_invalid_func():
    with pytest.raises(NameError):
        FakeCloudServer().call_method("get_this_function_does_not_exist")
コード例 #4
0
def test_calling_internal_func():
    with pytest.raises(NameError):
        FakeCloudServer().call_method("__init__")