Ejemplo n.º 1
0
def test_create_user():
    server = Server("http://test.test:5984")
    httpretty.register_uri(httpretty.HEAD, "http://test.test:5984/_users")
    httpretty.register_uri(
        httpretty.PUT,
        "http://test.test:5984/_users/org.couchdb.user%3Atest",
        status=201)
    server.create_user("test", "test")
Ejemplo n.º 2
0
def register(username, password):
    """
    Create a new user account. Creates a user account with the given
    credentials on the selected cloud server.
    """
    check_for_cloud_server()
    server = Server(config["cloud_server"]["url"])
    server.create_user(username, password)
Ejemplo n.º 3
0
def register(username, password):
    """
    Create a new user account. Creates a user account with the given
    credentials on the selected cloud server.
    """
    check_for_cloud_server()
    server = Server(config["cloud_server"]["url"])
    server.create_user(username, password)
Ejemplo n.º 4
0
def test_create_user():
    server = Server("http://test.test:5984")
    httpretty.register_uri(
        httpretty.HEAD, "http://test.test:5984/_users"
    )
    httpretty.register_uri(
        httpretty.PUT, "http://test.test:5984/_users/org.couchdb.user%3Atest",
        status=201
    )
    server.create_user("test", "test")