summary refs log tree commit diff
path: root/tests/storage/test_registration.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-04-28 11:00:27 +0100
committerMark Haines <mjark@negativecurvature.net>2015-04-28 11:00:27 +0100
commit9182f876645a27eb9599c99963876b12067fe93a (patch)
tree158a1e1213f73f2395389d5a861b5eb07f8eb36f /tests/storage/test_registration.py
parentMerge pull request #133 from matrix-org/invite_power_level (diff)
parentAdd commentage. (diff)
downloadsynapse-9182f876645a27eb9599c99963876b12067fe93a.tar.xz
Merge pull request #126 from matrix-org/csauth
Client / Server Auth Refactor
Diffstat (limited to 'tests/storage/test_registration.py')
-rw-r--r--tests/storage/test_registration.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/storage/test_registration.py b/tests/storage/test_registration.py
index e0b81f2b57..2f8953f518 100644
--- a/tests/storage/test_registration.py
+++ b/tests/storage/test_registration.py
@@ -38,13 +38,12 @@ class RegistrationStoreTestCase(unittest.TestCase):
     @defer.inlineCallbacks
     def test_register(self):
         yield self.store.register(self.user_id, self.tokens[0], self.pwhash)
+        u = (yield self.store.get_user_by_id(self.user_id))[0]
 
-        self.assertEquals(
-            # TODO(paul): Surely this field should be 'user_id', not 'name'
-            #  Additionally surely it shouldn't come in a 1-element list
-            [{"name": self.user_id, "password_hash": self.pwhash}],
-            (yield self.store.get_user_by_id(self.user_id))
-        )
+        # TODO(paul): Surely this field should be 'user_id', not 'name'
+        #  Additionally surely it shouldn't come in a 1-element list
+        self.assertEquals(self.user_id, u['name'])
+        self.assertEquals(self.pwhash, u['password_hash'])
 
         self.assertEquals(
             {"admin": 0,