got integration tests to work again with rebased branch

This commit is contained in:
Lex Berezhny 2018-07-25 01:15:51 -04:00 committed by Jack Robison
parent 473d2eabfa
commit 5597d45aed
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
4 changed files with 7 additions and 10 deletions

View file

@ -20,7 +20,7 @@ class RequiredConditionType(type):
return klass return klass
class RequiredCondition(object): class RequiredCondition(metaclass=RequiredConditionType):
name = "" name = ""
component = "" component = ""
message = "" message = ""
@ -29,8 +29,6 @@ class RequiredCondition(object):
def evaluate(component): def evaluate(component):
raise NotImplementedError() raise NotImplementedError()
__metaclass__ = RequiredConditionType
class ComponentManager(object): class ComponentManager(object):
default_component_classes = {} default_component_classes = {}

View file

@ -1,2 +1 @@
from . import custom_logger
from . import Components # register Component classes from . import Components # register Component classes

View file

@ -141,7 +141,7 @@ class AuthorizedBase(metaclass=JSONRPCServerType):
@staticmethod @staticmethod
def requires(*components, **conditions): def requires(*components, **conditions):
if conditions and ["conditions"] != conditions.keys(): if conditions and ["conditions"] != list(conditions.keys()):
raise SyntaxError("invalid conditions argument") raise SyntaxError("invalid conditions argument")
condition_names = conditions.get("conditions", []) condition_names = conditions.get("conditions", [])
@ -202,8 +202,8 @@ class AuthJSONRPCServer(AuthorizedBase):
skip_components=to_skip or [], skip_components=to_skip or [],
reactor=reactor reactor=reactor
) )
self.looping_call_manager = LoopingCallManager({n: lc for n, (lc, t) in (looping_calls or {}).iteritems()}) self.looping_call_manager = LoopingCallManager({n: lc for n, (lc, t) in (looping_calls or {}).items()})
self._looping_call_times = {n: t for n, (lc, t) in (looping_calls or {}).iteritems()} self._looping_call_times = {n: t for n, (lc, t) in (looping_calls or {}).items()}
self._use_authentication = use_authentication or conf.settings['use_auth_http'] self._use_authentication = use_authentication or conf.settings['use_auth_http']
self._component_setup_deferred = None self._component_setup_deferred = None
self.announced_startup = False self.announced_startup = False

View file

@ -15,7 +15,7 @@ lbryschema.BLOCKCHAIN_NAME = 'lbrycrd_regtest'
from lbrynet import conf as lbry_conf from lbrynet import conf as lbry_conf
from lbrynet.daemon.Daemon import Daemon from lbrynet.daemon.Daemon import Daemon
from lbrynet.wallet.manager import LbryWalletManager from lbrynet.wallet.manager import LbryWalletManager
from lbrynet.daemon.Components import WalletComponent, FileManager, SessionComponent, DatabaseComponent from lbrynet.daemon.Components import WalletComponent, FileManagerComponent, SessionComponent, DatabaseComponent
from lbrynet.daemon.ComponentManager import ComponentManager from lbrynet.daemon.ComponentManager import ComponentManager
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager
@ -106,7 +106,7 @@ class CommandTestCase(IntegrationTestCase):
analytics_manager = FakeAnalytics() analytics_manager = FakeAnalytics()
self.daemon = Daemon(analytics_manager, ComponentManager(analytics_manager, skip_components=[ self.daemon = Daemon(analytics_manager, ComponentManager(analytics_manager, skip_components=[
'wallet', 'database', 'session', 'fileManager' 'wallet', 'database', 'session', 'file_manager'
])) ]))
wallet_component = WalletComponent(self.daemon.component_manager) wallet_component = WalletComponent(self.daemon.component_manager)
@ -130,7 +130,7 @@ class CommandTestCase(IntegrationTestCase):
self.daemon.session.blob_manager.storage = self.daemon.storage self.daemon.session.blob_manager.storage = self.daemon.storage
self.daemon.component_manager.components.add(session_component) self.daemon.component_manager.components.add(session_component)
file_manager = FileManager(self.daemon.component_manager) file_manager = FileManagerComponent(self.daemon.component_manager)
file_manager.file_manager = EncryptedFileManager(session_component.session, True) file_manager.file_manager = EncryptedFileManager(session_component.session, True)
file_manager._running = True file_manager._running = True
self.daemon.file_manager = file_manager.file_manager self.daemon.file_manager = file_manager.file_manager