[879b32]: / qiita_pet / test / rest / test_base.py

Download this file

23 lines (18 with data), 964 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -----------------------------------------------------------------------------
# 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 RESTHandlerTestCase(TestHandlerBase):
def setUp(self):
self.client_token = 'SOMEAUTHTESTINGTOKENHERE2122'
r_client.hset(self.client_token, 'timestamp', '12/12/12 12:12:00')
r_client.hset(self.client_token, 'client_id', 'test123123123')
r_client.hset(self.client_token, 'grant_type', 'client')
r_client.expire(self.client_token, 5)
self.headers = {'Authorization': 'Bearer ' + self.client_token}
super(RESTHandlerTestCase, self).setUp()