soundcloud python/php apis, recorder python script so far.
This commit is contained in:
parent
b3e111b0a0
commit
f68a8f67ea
109 changed files with 24297 additions and 10 deletions
36
python_apps/soundcloud-api/scapi/tests/test_oauth.py
Normal file
36
python_apps/soundcloud-api/scapi/tests/test_oauth.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
import pkg_resources
|
||||
import scapi
|
||||
import scapi.authentication
|
||||
import urllib
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
_logger = logging.getLogger("scapi")
|
||||
_logger.setLevel(logging.DEBUG)
|
||||
|
||||
TOKEN = "QcciYu1FSwDSGKAG2mNw"
|
||||
SECRET = "gJ2ok6ULUsYQB3rsBmpHCRHoFCAPOgK8ZjoIyxzris"
|
||||
CONSUMER = "Cy2eLPrIMp4vOxjz9icdQ"
|
||||
CONSUMER_SECRET = "KsBa272x6M2to00Vo5FdvZXt9kakcX7CDIPJoGwTro"
|
||||
|
||||
def test_base64_connect():
|
||||
scapi.USE_PROXY = True
|
||||
scapi.PROXY = 'http://127.0.0.1:10000/'
|
||||
scapi.SoundCloudAPI(host='192.168.2.31:3000', authenticator=scapi.authentication.BasicAuthenticator('tiga', 'test'))
|
||||
sca = scapi.Scope()
|
||||
assert isinstance(sca.me(), scapi.User)
|
||||
|
||||
|
||||
def test_oauth_connect():
|
||||
scapi.USE_PROXY = True
|
||||
scapi.PROXY = 'http://127.0.0.1:10000/'
|
||||
scapi.SoundCloudAPI(host='192.168.2.31:3000',
|
||||
authenticator=scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
CONSUMER_SECRET,
|
||||
TOKEN, SECRET))
|
||||
|
||||
sca = scapi.Scope()
|
||||
assert isinstance(sca.me(), scapi.User)
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue