def setUp(self):
# Create an 'ephemeral' token so we can test token timeouts. We
# want a timeout long enough to last the test, but we don't want to
# slow down the tests too much either.
self.normal_creds = TokenCredentials(self.key_path, self.key_id,
self.team_id)
self.lasting_header = self.normal_creds.get_authorization_header(
self.topics[0])
with freeze_time('2012-01-14'):
self.expiring_creds = \
TokenCredentials(self.key_path, self.key_id,
self.team_id,
token_lifetime=self.token_lifetime)
self.expiring_header = self.expiring_creds.get_authorization_header(
self.topics[0])
评论列表
文章目录