MCPcopy Create free account
hub / github.com/EasyIME/PIME / get_token

Method get_token

python/python3/tornado/test/web_test.py:2740–2749  ·  view source on GitHub ↗
(self, old_token=None, version=None)

Source from the content-addressed store, hash-verified

2738 self.xsrf_token = self.get_token()
2739
2740 def get_token(self, old_token=None, version=None):
2741 if old_token is not None:
2742 headers = self.cookie_headers(old_token)
2743 else:
2744 headers = None
2745 response = self.fetch(
2746 "/" if version is None else ("/?version=%d" % version), headers=headers
2747 )
2748 response.rethrow()
2749 return native_str(response.body)
2750
2751 def cookie_headers(self, token=None):
2752 if token is None:

Callers 5

setUpMethod · 0.95
test_distinct_tokensMethod · 0.95
test_cross_userMethod · 0.95
test_refresh_tokenMethod · 0.95
test_versioningMethod · 0.95

Calls 3

cookie_headersMethod · 0.95
rethrowMethod · 0.80
fetchMethod · 0.45

Tested by

no test coverage detected