diff options
author | Jason Robinson <jasonr@matrix.org> | 2021-01-23 21:41:35 +0200 |
---|---|---|
committer | Jason Robinson <jasonr@matrix.org> | 2021-01-23 21:41:35 +0200 |
commit | 8965b6cfec8a1de847efe3d1be4b9babf4622e2e (patch) | |
tree | 4551f104ee2ce840689aa5ecffa939938482ffd5 /tests/storage/test_profile.py | |
parent | Add depth and received_ts to forward_extremities admin API response (diff) | |
parent | Return a 404 if no valid thumbnail is found. (#9163) (diff) | |
download | synapse-8965b6cfec8a1de847efe3d1be4b9babf4622e2e.tar.xz |
Merge branch 'develop' into jaywink/admin-forward-extremities
Diffstat (limited to 'tests/storage/test_profile.py')
-rw-r--r-- | tests/storage/test_profile.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py index 3fd0a38cf5..ea63bd56b4 100644 --- a/tests/storage/test_profile.py +++ b/tests/storage/test_profile.py @@ -48,6 +48,19 @@ class ProfileStoreTestCase(unittest.TestCase): ), ) + # test set to None + yield defer.ensureDeferred( + self.store.set_profile_displayname(self.u_frank.localpart, None) + ) + + self.assertIsNone( + ( + yield defer.ensureDeferred( + self.store.get_profile_displayname(self.u_frank.localpart) + ) + ) + ) + @defer.inlineCallbacks def test_avatar_url(self): yield defer.ensureDeferred(self.store.create_profile(self.u_frank.localpart)) @@ -66,3 +79,16 @@ class ProfileStoreTestCase(unittest.TestCase): ) ), ) + + # test set to None + yield defer.ensureDeferred( + self.store.set_profile_avatar_url(self.u_frank.localpart, None) + ) + + self.assertIsNone( + ( + yield defer.ensureDeferred( + self.store.get_profile_avatar_url(self.u_frank.localpart) + ) + ) + ) |