forked from LBRYCommunity/lbry-sdk
fix fee tests, whitespace
This commit is contained in:
parent
4698910ab7
commit
e6f92a2dc7
2 changed files with 26 additions and 27 deletions
|
@ -846,7 +846,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
resolved = yield self.session.wallet.resolve_uri(uri)
|
resolved = yield self.session.wallet.resolve_uri(uri)
|
||||||
if 'claim' in resolved:
|
if 'claim' in resolved:
|
||||||
claim = ClaimDict.deserialize(resolved['claim']['hex'].decode('hex'))
|
claim = ClaimDict.load_dict(resolved['claim']['value'])
|
||||||
final_fee = self._add_key_fee_to_est_data_cost(claim.source_fee, cost)
|
final_fee = self._add_key_fee_to_est_data_cost(claim.source_fee, cost)
|
||||||
result = yield self._render_response(final_fee)
|
result = yield self._render_response(final_fee)
|
||||||
defer.returnValue(result)
|
defer.returnValue(result)
|
||||||
|
@ -1546,7 +1546,6 @@ class Daemon(AuthJSONRPCServer):
|
||||||
'download_directory'(optional): (str) path to directory where file will be saved
|
'download_directory'(optional): (str) path to directory where file will be saved
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary contaning information about the stream
|
(dict) Dictionary contaning information about the stream
|
||||||
|
|
||||||
{
|
{
|
||||||
'completed': (bool) true if download is completed,
|
'completed': (bool) true if download is completed,
|
||||||
'file_name': (str) name of file,
|
'file_name': (str) name of file,
|
||||||
|
@ -1568,7 +1567,6 @@ class Daemon(AuthJSONRPCServer):
|
||||||
'message': (str), None if full_status is false
|
'message': (str), None if full_status is false
|
||||||
'metadata': (dict) Metadata dictionary
|
'metadata': (dict) Metadata dictionary
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
timeout = timeout if timeout is not None else self.download_timeout
|
timeout = timeout if timeout is not None else self.download_timeout
|
||||||
|
|
|
@ -86,7 +86,8 @@ def get_test_daemon(data_rate=None, generous=True, with_fee=False):
|
||||||
metadata.update(
|
metadata.update(
|
||||||
{"fee": {"USD": {"address": "bQ6BGboPV2SpTMEP7wLNiAcnsZiH8ye6eA", "amount": 0.75}}})
|
{"fee": {"USD": {"address": "bQ6BGboPV2SpTMEP7wLNiAcnsZiH8ye6eA", "amount": 0.75}}})
|
||||||
daemon._resolve_name = lambda _: defer.succeed(metadata)
|
daemon._resolve_name = lambda _: defer.succeed(metadata)
|
||||||
daemon.session.wallet.resolve_uri = lambda _: defer.succeed(smart_decode(json.dumps(metadata)))
|
migrated = smart_decode(json.dumps(metadata))
|
||||||
|
daemon.session.wallet.resolve_uri = lambda _: defer.succeed({'claim': {'value': migrated.claim_dict}})
|
||||||
return daemon
|
return daemon
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue