Parse config plugins on test

This commit is contained in:
HelloZeroNet 2016-03-23 13:30:18 +01:00
parent 61c846c6ed
commit d222018bb6

View file

@ -24,14 +24,18 @@ sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + "/..")) # Import
from Config import config from Config import config
config.argv = ["none"] # Dont pass any argv to config parser config.argv = ["none"] # Dont pass any argv to config parser
config.parse() config.parse() # Plugins need to access the configuration
config.data_dir = "src/Test/testdata" # Use test data for unittests
config.debug_socket = True # Use test data for unittests
config.tor = "disabled" # Don't start Tor client
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
from Plugin import PluginManager from Plugin import PluginManager
PluginManager.plugin_manager.loadPlugins() PluginManager.plugin_manager.loadPlugins()
config.loadPlugins()
config.parse() # Parse again to add plugin configuration options
config.data_dir = "src/Test/testdata" # Use test data for unittests
config.debug_socket = True # Use test data for unittests
config.tor = "disabled" # Don't start Tor client
import gevent import gevent
from gevent import monkey from gevent import monkey