s/user_id/user/g for consistency

This commit is contained in:
Daniel Wagner-Hall 2015-09-01 12:41:16 +01:00
parent 81450fded8
commit e255c2c32f
6 changed files with 25 additions and 25 deletions

View file

@ -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):