summary refs log tree commit diff
path: root/tests/api
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-09-01 12:41:16 +0100
committerDaniel Wagner-Hall <daniel@matrix.org>2015-09-01 12:41:16 +0100
commite255c2c32ff85db03abbf2dac184b2949f481cfb (patch)
tree43e08f2f16d859c14877f9374f0af2f746ffdd8c /tests/api
parentTurn TODO into thing which actually will fail (diff)
downloadsynapse-e255c2c32ff85db03abbf2dac184b2949f481cfb.tar.xz
s/user_id/user/g for consistency
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/test_auth.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/api/test_auth.py b/tests/api/test_auth.py
index 2e2d0c428a..c96273480d 100644
--- a/tests/api/test_auth.py
+++ b/tests/api/test_auth.py
@@ -146,17 +146,17 @@ class AuthTestCase(unittest.TestCase):
             return_value={"name": "@baldrick:matrix.org"}
         )
 
-        user = "@baldrick:matrix.org"
+        user_id = "@baldrick:matrix.org"
         macaroon = pymacaroons.Macaroon(
             location=self.hs.config.server_name,
             identifier="key",
             key=self.hs.config.macaroon_secret_key)
         macaroon.add_first_party_caveat("gen = 1")
         macaroon.add_first_party_caveat("type = access")
-        macaroon.add_first_party_caveat("user_id = %s" % (user,))
+        macaroon.add_first_party_caveat("user_id = %s" % (user_id,))
         user_info = yield self.auth._get_user_from_macaroon(macaroon.serialize())
-        user_id = user_info["user_id"]
-        self.assertEqual(UserID.from_string(user), user_id)
+        user = user_info["user"]
+        self.assertEqual(UserID.from_string(user_id), user)
 
     @defer.inlineCallbacks
     def test_get_user_from_macaroon_user_db_mismatch(self):