예제 #1
0
def get_group_projects(groupname):
    """
    Create a user to group relationship in the database
    Returns a json object
    """
    values = admin.get_group_projects(current_session, groupname)
    return jsonify({"projects": values})
예제 #2
0
def test_get_projects_from_inexistent_group(db_session, awg_groups):
    with pytest.raises(NotFound):
        group_projects = adm.get_group_projects(db_session, "test_group_XXX")
예제 #3
0
def test_get_group_projects(db_session, awg_groups):
    group_projects = set(adm.get_group_projects(db_session, "test_group_4"))
    expected_projects = {"test_project_7", "test_project_6"}
    assert expected_projects == group_projects