Skip to content

Commit a280352

Browse files
committed
update .gitignore and put secret.sample.py for tests
1 parent af1c757 commit a280352

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
*.pyo
44
test.py
55
*~
6+
tests/secret.py
7+
dist
8+
*.egg-info

qqweibo/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33
# Copyright 2011 andelf <[email protected]>
44
# See LICENSE for details.
5-
# Time-stamp: <2011-06-07 16:04:18 andelf>
5+
# Time-stamp: <2011-06-08 14:29:48 andelf>
66

77
from qqweibo.auth import OAuthHandler
88
from qqweibo.api import API
@@ -17,4 +17,4 @@
1717
'ModelParser', 'JSONParser',
1818
'MemoryCache', 'FileCache']
1919

20-
version = '0.3.6'
20+
version = '0.3.7'

tests/secret.sample.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiKey = 'your key'
2+
apiSecret = 'your secret'
3+
token = 'your token'
4+
tokenSecret = 'your token secret'

tests/test_pyqqweibo.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Created : Wed Jun 08 10:20:57 2011 by Feather.et.ELF
66
# Copyright : Feather Workshop (c) 2011
77
# Description : testcast
8-
# Time-stamp: <2011-06-08 14:09:37 andelf>
8+
# Time-stamp: <2011-06-08 14:27:52 andelf>
99

1010
from __future__ import unicode_literals
1111
from __future__ import print_function
@@ -83,10 +83,10 @@ class QWeiboTestCase(unittest.TestCase):
8383
@classmethod
8484
def setUpClass(cls):
8585
"""generate OAuthHandler"""
86-
auth = OAuthHandler('APIKEY',
87-
'APISECRET')
88-
token = 'TOKEN'
89-
tokenSecret = 'TOKENSECRET'
86+
import secret
87+
auth = OAuthHandler(secret.apiKey, secret.apiSecret)
88+
token = secret.token
89+
tokenSecret = secret.tokenSecret
9090
auth.setToken(token, tokenSecret)
9191
cls.auth = auth
9292

0 commit comments

Comments
 (0)