def test_get_plugin_source_from_blueprints_dir(self): plugin = {'source': 'plugin-dir-name'} with test_utils.env( constants.MANAGER_FILE_SERVER_BLUEPRINTS_ROOT_URL_KEY, 'localhost'): source = installer.get_plugin_source(plugin, blueprint_id='blueprint_id') self.assertEqual('localhost/blueprint_id/plugins/plugin-dir-name.zip', source)
def test_get_plugin_source_from_blueprints_dir(self): plugin = { 'source': 'plugin-dir-name' } with utils.env(constants.MANAGER_FILE_SERVER_BLUEPRINTS_ROOT_URL_KEY, 'localhost'): source = operations.get_plugin_source( plugin, blueprint_id='blueprint_id') self.assertEqual( 'localhost/blueprint_id/plugins/plugin-dir-name.zip', source)
def test_app(self): with env('CELERY_BROKER_URL', 'test-url'): reload(app) self.assertEqual(app.app.conf['BROKER_URL'], 'test-url') self.assertEqual(app.app.conf['CELERY_RESULT_BACKEND'], 'test-url')
def test_broker_url_from_env(self): with env('CELERY_BROKER_URL', 'test-url'): reload(app) self.assertEqual(app.broker_url, 'test-url')