Skip to content

Commit

Permalink
fixed forgotten docstring and added better variable-naming
Browse files Browse the repository at this point in the history
  • Loading branch information
sistason committed May 6, 2022
1 parent 5716a87 commit 1a3458c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rocketchat_API/APISections/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def channels_rename(self, room_id, name, **kwargs):
)

def channels_set_default(self, room_id, default, **kwargs):
"""Sets the description for the channel."""
"""Sets whether the channel is a default channel or not."""
return self.call_api_post(
"channels.setDefault",
roomId=room_id,
Expand Down
10 changes: 6 additions & 4 deletions tests/test_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,11 @@ def test_channels_online(logged_rocket):


def test_channels_set_default(logged_rocket):
results = logged_rocket.channels_set_default(
channels_set_default = logged_rocket.channels_set_default(
room_id="GENERAL", default=False
).json()
assert results.get("channel").get("default") is False
results = logged_rocket.channels_set_default(room_id="GENERAL", default=True).json()
assert results.get("channel").get("default")
assert channels_set_default.get("channel").get("default") is False
channels_set_default = logged_rocket.channels_set_default(
room_id="GENERAL", default=True
).json()
assert channels_set_default.get("channel").get("default")

0 comments on commit 1a3458c

Please sign in to comment.