diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-26 07:19:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 07:19:32 -0400 |
commit | 4c6c56dc58aba7af92f531655c2355d8f25e529c (patch) | |
tree | f08e4193836fc542f1400fbe407c6323f54171c2 /tests/storage/test_profile.py | |
parent | Fix rate limiting unit tests. (#8167) (diff) | |
download | synapse-4c6c56dc58aba7af92f531655c2355d8f25e529c.tar.xz |
Convert simple_select_one and simple_select_one_onecol to async (#8162)
Diffstat (limited to 'tests/storage/test_profile.py')
-rw-r--r-- | tests/storage/test_profile.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py index 9d5b8aa47d..3fd0a38cf5 100644 --- a/tests/storage/test_profile.py +++ b/tests/storage/test_profile.py @@ -35,21 +35,34 @@ class ProfileStoreTestCase(unittest.TestCase): def test_displayname(self): yield defer.ensureDeferred(self.store.create_profile(self.u_frank.localpart)) - yield self.store.set_profile_displayname(self.u_frank.localpart, "Frank") + yield defer.ensureDeferred( + self.store.set_profile_displayname(self.u_frank.localpart, "Frank") + ) self.assertEquals( - "Frank", (yield self.store.get_profile_displayname(self.u_frank.localpart)) + "Frank", + ( + 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)) - yield self.store.set_profile_avatar_url( - self.u_frank.localpart, "http://my.site/here" + yield defer.ensureDeferred( + self.store.set_profile_avatar_url( + self.u_frank.localpart, "http://my.site/here" + ) ) self.assertEquals( "http://my.site/here", - (yield self.store.get_profile_avatar_url(self.u_frank.localpart)), + ( + yield defer.ensureDeferred( + self.store.get_profile_avatar_url(self.u_frank.localpart) + ) + ), ) |