summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2021-02-17 21:19:23 +0100
committerGitHub <noreply@github.com>2021-02-17 15:19:23 -0500
commitc8d9383cfb0985a99bf10756ea2dcb0b6329859d (patch)
tree9941bb1acc72e621b361c0609b5c93d0d2a32c28 /tests
parentRemove dead notify_for_states presence method (#9408) (diff)
downloadsynapse-c8d9383cfb0985a99bf10756ea2dcb0b6329859d.tar.xz
Add the shadow-banning status to the display user admin API. (#9400)
Diffstat (limited to 'tests')
-rw-r--r--tests/rest/admin/test_user.py2
-rw-r--r--tests/storage/test_registration.py1
2 files changed, 3 insertions, 0 deletions
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))),
         )