Esempio n. 1
0
def list(client):
    """Lists user information for the current user.

    Lists information associated withe the user for the current api key.
    """
    user = User.singleton(client)
    User.display(client, [user])
Esempio n. 2
0
def list(client):
    """Lists user information for the current user.

    Lists information associated withe the user for the current api key.
    """
    user = User.singleton(client)
    User.display(client, [user])
Esempio n. 3
0
def update(client, name):
    """Update the attributes of the user.

    Updates the attributes of the currently authorized user.
    """
    user = User.singleton(client)
    attributes = OrderedDict()
    if name:
        attributes['name'] = name
    user = user.update(attributes=attributes)
    User.display(client, [user])
Esempio n. 4
0
def auth(client, email, password):     # pragma: no cover
    """Authenticate a user.

    Authenticates the given EMAIL and PASSWORD and displays the api key.
    """
    user = User.authenticate(client, email, password)
    click.echo(user.meta.api_token)
Esempio n. 5
0
def test_display_map(client, authorized_user):
    assert authorized_user is not None

    display_map = User.display_map(client)
    assert display_map is not None

    values = [f(authorized_user) for f in display_map.values()]
    assert values is not None