class TestSubsystemRouter(unittest.TestCase):
    def setUp(self):
        self.manager = Manager(
            {
                "sources": [os.path.abspath(os.path.join(os.path.dirname(lascaux.__file__), "subsystems"))],
                "subsystems": {"router": {"enabled": True, "routers": {"regex": {"enabled": True}}}},
            }
        )
        self.manager.setup()

    def runTest(self):
        self.manager.execute("load_routers")
class TestSubsystemPlugin(unittest.TestCase):

    def setUp(self):
        self.manager = Manager({
            'sources': [os.path.abspath(os.path.join(os.path.dirname(lascaux.__file__), 'subsystems'))],
            'subsystems': {
                'plugin': {
                    'enabled': True
                }
            }
        })
        self.manager.setup()

    def test_find_plugins(self):
        self.manager.execute('load_plugins')
 def setUp(self):
     self.m = Manager()
     self.m.add_subsystem(os.path.join(lascaux.__lib_path__,
                                       'subsystems', 'hook'))
     self.m.add_subsystem(os.path.join(lascaux.__lib_path__,
                                       'subsystems', 'plugin'))
     self.m.init()
 def setUp(self):
     self.manager = Manager(
         {
             "sources": [os.path.abspath(os.path.join(os.path.dirname(lascaux.__file__), "subsystems"))],
             "subsystems": {"router": {"enabled": True, "routers": {"regex": {"enabled": True}}}},
         }
     )
     self.manager.setup()
class TestSubsystemHook(unittest.TestCase):

    def setUp(self):
        self.m = Manager()
        self.m.add_subsystem(os.path.join(lascaux.__lib_path__,
                                          'subsystems', 'hook'))
        self.m.add_subsystem(os.path.join(lascaux.__lib_path__,
                                          'subsystems', 'plugin'))
        self.m.init()

    def runTest(self):
        self.m.execute("__load_enabled_plugins__")
 def setUp(self):
     self.manager = Manager({
         'sources': [os.path.abspath(os.path.join(os.path.dirname(lascaux.__file__), 'subsystems'))],
         'subsystems': {
             'plugin': {
                 'enabled': True
             }
         }
     })
     self.manager.setup()
class TestSubsystemServer(unittest.TestCase):

    def setUp(self):
        self.manager = Manager({
            'sources': [os.path.abspath(os.path.join(os.path.dirname(lascaux.__file__), 'subsystems'))],
            'subsystems': {
                'server': {
                    'enabled': True,
                    'sources': [],
                    'servers': {
                        'simplewsgi': {
                            'enabled': True
                        }
                    }
                }
            }
        })
        self.manager.setup()

    def runTest(self):
        self.manager.execute('load_servers')
        self.manager.execute('start_servers')