forked from LBRYCommunity/lbry-sdk
fee tests
This commit is contained in:
parent
4ade80c8a9
commit
7d22bfffa5
1 changed files with 7 additions and 7 deletions
|
@ -8,12 +8,12 @@ class LBRYFeeFormatTest(unittest.TestCase):
|
|||
def test_fee_created_with_correct_inputs(self):
|
||||
fee_dict = {
|
||||
'USD': {
|
||||
'amount': 10,
|
||||
'address': None
|
||||
'amount': 10.0,
|
||||
'address': "bRcHraa8bYJZL7vkh5sNmGwPDERFUjGPP9"
|
||||
}
|
||||
}
|
||||
fee = LBRYMetadata.LBRYFeeValidator(fee_dict)
|
||||
self.assertEqual(10, fee['USD']['amount'])
|
||||
self.assertEqual(10.0, fee['USD']['amount'])
|
||||
|
||||
|
||||
class LBRYFeeTest(unittest.TestCase):
|
||||
|
@ -28,13 +28,13 @@ class LBRYFeeTest(unittest.TestCase):
|
|||
def test_fee_converts_to_lbc(self):
|
||||
fee_dict = {
|
||||
'USD': {
|
||||
'amount': 10,
|
||||
'address': None
|
||||
'amount': 10.0,
|
||||
'address': "bRcHraa8bYJZL7vkh5sNmGwPDERFUjGPP9"
|
||||
}
|
||||
}
|
||||
rates = {'BTCLBC': {'spot': 3, 'ts': 2}, 'USDBTC': {'spot': 2, 'ts': 3}}
|
||||
rates = {'BTCLBC': {'spot': 3.0, 'ts': 2}, 'USDBTC': {'spot': 2.0, 'ts': 3}}
|
||||
fee = LBRYMetadata.LBRYFee(fee_dict, rates, 0)
|
||||
self.assertEqual(60, fee.to_lbc())
|
||||
self.assertEqual(60.0, fee.to_lbc())
|
||||
|
||||
|
||||
class MetadataTest(unittest.TestCase):
|
||||
|
|
Loading…
Reference in a new issue