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
class RequiredCondition(object):
class RequiredCondition(metaclass=RequiredConditionType):
name = ""
component = ""
message = ""
@ -29,8 +29,6 @@ class RequiredCondition(object):
def evaluate(component):
raise NotImplementedError()
__metaclass__ = RequiredConditionType
class ComponentManager(object):
default_component_classes = {}

View file

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

View file

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

View file

@ -15,7 +15,7 @@ lbryschema.BLOCKCHAIN_NAME = 'lbrycrd_regtest'
from lbrynet import conf as lbry_conf
from lbrynet.daemon.Daemon import Daemon
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.file_manager.EncryptedFileManager import EncryptedFileManager
@ -106,7 +106,7 @@ class CommandTestCase(IntegrationTestCase):
analytics_manager = FakeAnalytics()
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)
@ -130,7 +130,7 @@ class CommandTestCase(IntegrationTestCase):
self.daemon.session.blob_manager.storage = self.daemon.storage
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._running = True
self.daemon.file_manager = file_manager.file_manager