コード例 #1
0
ファイル: user.py プロジェクト: helium/helium-commander
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])
コード例 #2
0
ファイル: user.py プロジェクト: isabella232/helium-commander
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])
コード例 #3
0
ファイル: user.py プロジェクト: isabella232/helium-commander
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])
コード例 #4
0
ファイル: user.py プロジェクト: helium/helium-commander
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)
コード例 #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