Esempio n. 1
0
def main():
    import tornado.options
    tornado.options.parse_command_line()
    ConfigurationManager.load()
    config = ConfigurationManager.get_config()
    service_config = config.get("messagebus_service")

    routes = [(service_config.get('route'), WebsocketEventHandler)]

    application = web.Application(routes, **settings)

    application.listen(service_config.get("port"), service_config.get("host"))
    loop = ioloop.IOLoop.instance()
    loop.start()
Esempio n. 2
0
def main():
    import tornado.options
    tornado.options.parse_command_line()
    ConfigurationManager.load()
    config = ConfigurationManager.get_config()
    service_config = config.get("messagebus_service")

    routes = [
        (service_config.get('route'), WebsocketEventHandler)
    ]

    application = tornado.web.Application(routes, **settings)

    application.listen(service_config.get("port"), service_config.get("host"))
    ioloop = tornado.ioloop.IOLoop.instance()
    ioloop.start()
Esempio n. 3
0
from mycroft.configuration.config import ConfigurationManager

__author__ = 'seanfitz'
import unittest

from xmlrunner import XMLTestRunner
import os
import sys

TEST_DIR = os.path.dirname(os.path.realpath(__file__))
OUTPUT_DIR = os.path.dirname(os.path.dirname(__file__))

loader = unittest.TestLoader()
fail_on_error = "--fail-on-error" in sys.argv
ConfigurationManager.load(os.path.join(TEST_DIR, 'config.ini'))
tests = loader.discover(TEST_DIR, pattern="*_test*.py")
runner = XMLTestRunner(output="./build/report/tests")
result = runner.run(tests)
if fail_on_error and len(result.failures + result.errors) > 0:
    sys.exit(1)
Esempio n. 4
0
from mycroft.configuration.config import ConfigurationManager

__author__ = 'seanfitz'
import unittest

from xmlrunner import XMLTestRunner
import os
import sys


TEST_DIR = os.path.dirname(os.path.realpath(__file__))
OUTPUT_DIR = os.path.dirname(os.path.dirname(__file__))

loader = unittest.TestLoader()
fail_on_error = "--fail-on-error" in sys.argv
ConfigurationManager.load(os.path.join(TEST_DIR, 'config.ini'))
tests = loader.discover(TEST_DIR, pattern="*_test*.py")
runner = XMLTestRunner(output="./build/report/tests")
result = runner.run(tests)
if fail_on_error and len(result.failures + result.errors) > 0:
    sys.exit(1)