Пример #1
0
 def test_from_string_with_context(self):
     access_token = AccessToken.from_string(
         "oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key&"
         "lp.context=firefox")
     self.assertEqual("lock&key", access_token.key)
     self.assertEqual("secret=password", access_token.secret)
     self.assertEqual("firefox", access_token.context)
Пример #2
0
 def test_from_string(self):
     access_token = AccessToken.from_string(
         "oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key")
     self.assertEqual("lock&key", access_token.key)
     self.assertEqual("secret=password", access_token.secret)
     self.assertIsNone(access_token.context)