[973924]: / qiita_db / handlers / tests / oauthbase.py

Download this file

22 lines (17 with data), 841 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------------------
from qiita_core.qiita_settings import r_client
from qiita_pet.test.tornado_test_base import TestHandlerBase
class OauthTestingBase(TestHandlerBase):
def setUp(self):
self.token = 'TESTINGOAUTHSTUFF'
self.header = {'Authorization': 'Bearer ' + self.token}
r_client.hset(self.token, 'timestamp', '12/12/12 12:12:00')
r_client.hset(self.token, 'grant_type', 'client')
r_client.expire(self.token, 20)
super(OauthTestingBase, self).setUp()