Skip to content

Commit 1887891

Browse files
authored
Merge pull request #41 from CiscoDevNet/pr/40
@Deepar3292 correction to enable team updates.
2 parents e249eb6 + 38bb05e commit 1887891

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

ciscosparkapi/api/teams.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def update(self, teamId, **update_attributes):
190190
"argument must be specified."
191191
raise ciscosparkapiException(error_message)
192192
# API request
193-
json_obj = self._session.post('teams/' + teamId,
194-
json=update_attributes)
193+
json_obj = self._session.put('teams/' + teamId,
194+
json=update_attributes)
195195
# Return a Team object created from the response JSON data
196196
return Team(json_obj)
197197

tests/api/test_teams.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,11 @@ def test_get_team_details(self, api, team):
9595
team = get_team_details_by_id(api, team.id)
9696
assert is_valid_team(team)
9797

98-
# TODO: Investigate update team name API not working
99-
# def test_update_team_name(self, api, team):
100-
# new_name = create_string("Updated Team")
101-
# team = api.teams.update(team.id, name=new_name)
102-
# assert is_valid_team(team)
103-
# assert team.title == new_name
98+
def test_update_team_name(self, api, team):
99+
new_name = create_string("Updated Team")
100+
team = api.teams.update(team.id, name=new_name)
101+
assert is_valid_team(team)
102+
assert team.name == new_name
104103

105104
def test_delete_team(self, api, temp_team):
106105
api.teams.delete(temp_team.id)

0 commit comments

Comments
 (0)