def test_sad_raise_for_invalid_project_identifier():
    """
        on attempt to get users will raise an error for a invalid project identifier
    """
    jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG)

    with py.test.raises(JiraProxyError) as excinfo:
        users = jp.getAssignableUsers(BAD_PROJECT_KEY_1)
    actualErrorMessage = excErrorMessage(excinfo)
    assert 'Could not find project for identifier:' in actualErrorMessage
def test_get_assignable_users():
    """
        will return assignable users with the getAssignableUsers method
    """
    jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG)
    users = jp.getAssignableUsers(PROJECT_KEY_1)

    assert len(users) > 1

    user_names = [user.name for user in users]
    assert GOOD_VANILLA_SERVER_CONFIG['user'] in user_names