Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix UsersListTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Dec 17, 2020
1 parent c070223 commit 9329b7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.d/8964.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug where deactivated users appeared in the user directory when their profile information was updated.
10 changes: 4 additions & 6 deletions tests/rest/admin/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,7 @@ def test_requester_is_no_admin(self):
"""
other_user_token = self.login("user1", "pass1")

request, channel = self.make_request(
"GET", self.url, access_token=other_user_token,
)
channel = self.make_request("GET", self.url, access_token=other_user_token)

self.assertEqual(403, int(channel.result["code"]), msg=channel.result["body"])
self.assertEqual(Codes.FORBIDDEN, channel.json_body["errcode"])
Expand Down Expand Up @@ -540,7 +538,7 @@ def _search_test(
expected_http_code: The expected http code for the request
"""
url = self.url + "?%s=%s" % (search_field, search_term,)
request, channel = self.make_request(
channel = self.make_request(
"GET", url.encode("ascii"), access_token=self.admin_user_tok,
)
self.assertEqual(expected_http_code, channel.code, msg=channel.json_body)
Expand Down Expand Up @@ -1026,7 +1024,7 @@ def test_change_name_deactivate_user_user_directory(self):
# Deactivate user
body = json.dumps({"deactivated": True})

request, channel = self.make_request(
channel = self.make_request(
"PUT",
self.url_other_user,
access_token=self.admin_user_tok,
Expand All @@ -1044,7 +1042,7 @@ def test_change_name_deactivate_user_user_directory(self):
# Set new displayname user
body = json.dumps({"displayname": "Foobar"})

request, channel = self.make_request(
channel = self.make_request(
"PUT",
self.url_other_user,
access_token=self.admin_user_tok,
Expand Down

0 comments on commit 9329b7e

Please sign in to comment.