forked from LBRYCommunity/lbry-sdk
actually cleanup patched time.time
This commit is contained in:
parent
0995d864e8
commit
35481a92f5
2 changed files with 5 additions and 7 deletions
|
@ -235,7 +235,7 @@ class LBRYFileReflectorClient(Protocol):
|
|||
else:
|
||||
# close connection
|
||||
log.debug('No more blob hashes, closing connection')
|
||||
self.transport.closeConnection()
|
||||
self.transport.loseConnection()
|
||||
|
||||
|
||||
class LBRYFileReflectorClientFactory(ClientFactory):
|
||||
|
|
|
@ -19,12 +19,10 @@ class LBRYFeeFormatTest(unittest.TestCase):
|
|||
|
||||
class LBRYFeeTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.patcher = mock.patch('time.time')
|
||||
self.time = self.patcher.start()
|
||||
patcher = mock.patch('time.time')
|
||||
self.time = patcher.start()
|
||||
self.time.return_value = 0
|
||||
|
||||
def tearDown(self):
|
||||
self.time.stop()
|
||||
self.addCleanup(patcher.stop)
|
||||
|
||||
def test_fee_converts_to_lbc(self):
|
||||
fee_dict = {
|
||||
|
@ -35,4 +33,4 @@ class LBRYFeeTest(unittest.TestCase):
|
|||
}
|
||||
rates = {'BTCLBC': {'spot': 3.0, 'ts': 2}, 'USDBTC': {'spot': 2.0, 'ts': 3}}
|
||||
manager = LBRYExchangeRateManager.DummyExchangeRateManager(rates)
|
||||
self.assertEqual(60.0, manager.to_lbc(fee_dict).amount)
|
||||
self.assertEqual(60.0, manager.to_lbc(fee_dict).amount)
|
||||
|
|
Loading…
Reference in a new issue