def test_update_group(db_session, awg_groups): group = db_session.query(Group).filter_by(name="test_group_4").first() assert group.name == "test_group_4" assert group.description == "the fourth test group" adm.update_group(db_session, "test_group_4", "the fifth test group", "test_group_5") group = db_session.query(Group).filter_by(name="test_group_4").first() assert group == None group = db_session.query(Group).filter_by(name="test_group_5").first() assert group.name == "test_group_5" assert group.description == "the fifth test group"
def update_group(groupname): """ Retrieve the information regarding the buckets created within a project. Returns a json object. """ name = request.get_json().get("name", None) description = request.get_json().get("description", None) response = jsonify( admin.update_group(current_session, groupname, description, name)) return response