示例#1
0
    def test_prepare_service(self):

        cfg.CONF.reset()

        with fixtures.EnvironmentVariable('VIRTUAL_ENV'):
            cfgfile = self.create_tempfiles(
                [(os.path.join(os.path.expanduser('~'),
                               'tvrenamer'),
                    ''.join(self.cfg_data))])[0]
            self.addCleanup(os.removedirs, os.path.dirname(cfgfile))
            self.addCleanup(os.unlink, cfgfile)
            service.prepare_service([])

        self.assertEqual(
            logging.getLogger('tvdbapi_client').getEffectiveLevel(),
            logging.WARNING)
        self.assertEqual(cfg.CONF.libraries, ['/tmp/junk'])
示例#2
0
def main():
    service.prepare_service()
    manager.run()
    return 0