test_Downloder tests fixed

This commit is contained in:
Lex Berezhny 2018-08-04 21:08:22 -04:00 committed by Jack Robison
parent 0dd6193eaa
commit 0badea874d
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -3,22 +3,21 @@ import mock
from twisted.trial import unittest from twisted.trial import unittest
from twisted.internet import defer, task from twisted.internet import defer, task
from lbrynet.wallet.manager import LbryWalletManager
from lbrynet.core import PaymentRateManager from lbrynet.core import PaymentRateManager
from lbrynet.core.Error import DownloadDataTimeout, DownloadSDTimeout from lbrynet.core.Error import DownloadDataTimeout, DownloadSDTimeout
from lbrynet.daemon import Downloader
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier
from lbrynet.database.storage import SQLiteStorage
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.core.BlobManager import DiskBlobManager
from lbrynet.dht.peerfinder import DummyPeerFinder
from lbrynet.core.RateLimiter import DummyRateLimiter from lbrynet.core.RateLimiter import DummyRateLimiter
from lbrynet.daemon import Downloader
from lbrynet.daemon.ExchangeRateManager import ExchangeRateManager
from lbrynet.database.storage import SQLiteStorage
from lbrynet.dht.peerfinder import DummyPeerFinder
from lbrynet.file_manager.EncryptedFileStatusReport import EncryptedFileStatusReport from lbrynet.file_manager.EncryptedFileStatusReport import EncryptedFileStatusReport
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloader from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloader
from lbrynet.daemon.ExchangeRateManager import ExchangeRateManager from lbrynet.wallet.manager import LbryWalletManager
from lbrynet.tests.mocks import ExchangeRateManager as DummyExchangeRateManager from tests.mocks import mock_conf_settings
from lbrynet.tests.mocks import mock_conf_settings
class MocDownloader(object): class MocDownloader(object):
@ -71,7 +70,7 @@ class GetStreamTests(unittest.TestCase):
mock_conf_settings(self) mock_conf_settings(self)
sd_identifier = mock.Mock(spec=StreamDescriptorIdentifier) sd_identifier = mock.Mock(spec=StreamDescriptorIdentifier)
wallet = mock.Mock(spec=LbryWalletmanager) wallet = mock.Mock(spec=LbryWalletManager)
prm = mock.Mock(spec=PaymentRateManager.NegotiatedPaymentRateManager) prm = mock.Mock(spec=PaymentRateManager.NegotiatedPaymentRateManager)
exchange_rate_manager = mock.Mock(spec=ExchangeRateManager) exchange_rate_manager = mock.Mock(spec=ExchangeRateManager)
storage = mock.Mock(spec=SQLiteStorage) storage = mock.Mock(spec=SQLiteStorage)