From c8d9383cfb0985a99bf10756ea2dcb0b6329859d Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Wed, 17 Feb 2021 21:19:23 +0100 Subject: Add the shadow-banning status to the display user admin API. (#9400) --- tests/rest/admin/test_user.py | 2 ++ tests/storage/test_registration.py | 1 + 2 files changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/rest/admin/test_user.py b/tests/rest/admin/test_user.py index ff75199c8e..ba26895391 100644 --- a/tests/rest/admin/test_user.py +++ b/tests/rest/admin/test_user.py @@ -769,6 +769,7 @@ class UsersListTestCase(unittest.HomeserverTestCase): self.assertIn("admin", u) self.assertIn("user_type", u) self.assertIn("deactivated", u) + self.assertIn("shadow_banned", u) self.assertIn("displayname", u) self.assertIn("avatar_url", u) @@ -1146,6 +1147,7 @@ class UserRestTestCase(unittest.HomeserverTestCase): self.assertEqual(False, channel.json_body["admin"]) self.assertEqual(False, channel.json_body["is_guest"]) self.assertEqual(False, channel.json_body["deactivated"]) + self.assertEqual(False, channel.json_body["shadow_banned"]) self.assertEqual("mxc://fibble/wibble", channel.json_body["avatar_url"]) @override_config( diff --git a/tests/storage/test_registration.py b/tests/storage/test_registration.py index abbaed7cdc..4eb41c46e8 100644 --- a/tests/storage/test_registration.py +++ b/tests/storage/test_registration.py @@ -52,6 +52,7 @@ class RegistrationStoreTestCase(unittest.TestCase): "creation_ts": 1000, "user_type": None, "deactivated": 0, + "shadow_banned": 0, }, (yield defer.ensureDeferred(self.store.get_user_by_id(self.user_id))), ) -- cgit 1.4.1