forked from LBRYCommunity/lbry-sdk
Rename client and add test_cli to tox.ini
This commit is contained in:
parent
08b4fd6942
commit
2590523fa1
2 changed files with 4 additions and 2 deletions
|
@ -47,7 +47,7 @@ class UnAuthAPIClient:
|
||||||
return await resp.json()
|
return await resp.json()
|
||||||
|
|
||||||
|
|
||||||
class AsyncAuthAPIClient:
|
class AuthAPIClient:
|
||||||
def __init__(self, key, session, cookies, url, login_url):
|
def __init__(self, key, session, cookies, url, login_url):
|
||||||
self.session = session
|
self.session = session
|
||||||
self.__api_key = key
|
self.__api_key = key
|
||||||
|
@ -131,5 +131,5 @@ class LBRYAPIClient:
|
||||||
conf.conf_file = conf_path
|
conf.conf_file = conf_path
|
||||||
if not conf.settings:
|
if not conf.settings:
|
||||||
conf.initialize_settings()
|
conf.initialize_settings()
|
||||||
return AsyncAuthAPIClient.get_client() if conf.settings['use_auth_http'] else \
|
return AuthAPIClient.get_client() if conf.settings['use_auth_http'] else \
|
||||||
UnAuthAPIClient.from_url(conf.settings.get_api_connection_string())
|
UnAuthAPIClient.from_url(conf.settings.get_api_connection_string())
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -18,3 +18,5 @@ commands =
|
||||||
orchstr8 download
|
orchstr8 download
|
||||||
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_transactions.BasicTransactionTest
|
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_transactions.BasicTransactionTest
|
||||||
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_commands.EpicAdventuresOfChris45
|
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_commands.EpicAdventuresOfChris45
|
||||||
|
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.cli.test_cli.AuthCLIIntegrationTest
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue