summary refs log tree commit diff
path: root/tests/storage/test_profile.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-17 16:58:59 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-17 16:58:59 +0100
commitbcf512193705a0aaca2da3bbfd62ce6f4cb65980 (patch)
tree31d74cbe82b3ba570338b680a0c28d98d94b6335 /tests/storage/test_profile.py
parentUnit tests for (some) room events via the RoomStore (diff)
downloadsynapse-bcf512193705a0aaca2da3bbfd62ce6f4cb65980.tar.xz
Neaten more of the storage layer tests with assertObjectHasAttributes; more standardisation on test layout
Diffstat (limited to 'tests/storage/test_profile.py')
-rw-r--r--tests/storage/test_profile.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py
index 21df2babdc..5d36723c28 100644
--- a/tests/storage/test_profile.py
+++ b/tests/storage/test_profile.py
@@ -48,9 +48,10 @@ class ProfileStoreTestCase(unittest.TestCase):
             self.u_frank.localpart, "Frank"
         )
 
-        name = yield self.store.get_profile_displayname(self.u_frank.localpart)
-
-        self.assertEquals("Frank", name)
+        self.assertEquals(
+            "Frank",
+            (yield self.store.get_profile_displayname(self.u_frank.localpart))
+        )
 
     @defer.inlineCallbacks
     def test_avatar_url(self):
@@ -62,6 +63,7 @@ class ProfileStoreTestCase(unittest.TestCase):
                 self.u_frank.localpart, "http://my.site/here"
         )
 
-        name = yield self.store.get_profile_avatar_url(self.u_frank.localpart)
-
-        self.assertEquals("http://my.site/here", name)
+        self.assertEquals(
+            "http://my.site/here",
+            (yield self.store.get_profile_avatar_url(self.u_frank.localpart))
+        )