diff --git a/grafana_client/elements/team.py b/grafana_client/elements/team.py index 6200637..79e9412 100644 --- a/grafana_client/elements/team.py +++ b/grafana_client/elements/team.py @@ -215,6 +215,6 @@ def remove_team_external_group(self, team_id, group_id): :param group_id: :return: """ - team_group_path = "/teams/%s/groups/%s" % (team_id, group_id) + team_group_path = "/teams/%s/groups?groupId=%s" % (team_id, group_id) r = self.client.DELETE(team_group_path) return r diff --git a/test/elements/test_team.py b/test/elements/test_team.py index dff8849..d549b99 100644 --- a/test/elements/test_team.py +++ b/test/elements/test_team.py @@ -327,8 +327,8 @@ def test_add_team_external_group(self, m): @requests_mock.Mocker() def test_remove_team_external_group(self, m): m.delete( - "http://localhost/api/teams/42/groups/1", + "http://localhost/api/teams/42/groups?groupId=a_external_group", json={"message": "Team group removed"}, ) - r = self.grafana.teams.remove_team_external_group("42", "1") + r = self.grafana.teams.remove_team_external_group("42", "a_external_group") self.assertEqual(r["message"], "Team group removed")