@mock_plugin_manager(plugins=[ComplexAirflowPlugin])
def test_should_display_one_plugins(self):
    with redirect_stdout(io.StringIO()) as temp_stdout:
        plugins_command.dump_plugins(self.parser.parse_args(['plugins', '--output=json']))
        stdout = temp_stdout.getvalue()
    print(stdout)
    info = json.loads(stdout)
    assert (info == [{'name': 'test_plugin', 'macros': ['tests.plugins.test_plugin.plugin_macro'], 'executors': ['tests.plugins.test_plugin.PluginExecutor'], 'flask_blueprints': ["<flask.blueprints.Blueprint: name='test_plugin' import_name='tests.plugins.test_plugin'>"], 'appbuilder_views': [{'name': 'Test View', 'category': 'Test Plugin', 'view': 'tests.plugins.test_plugin.PluginTestAppBuilderBaseView'}], 'global_operator_extra_links': ['<tests.test_utils.mock_operators.AirflowLink object>', '<tests.test_utils.mock_operators.GithubLink object>'], 'timetables': ['tests.plugins.test_plugin.CustomCronDataIntervalTimetable'], 'operator_extra_links': ['<tests.test_utils.mock_operators.GoogleLink object>', '<tests.test_utils.mock_operators.AirflowLink2 object>', '<tests.test_utils.mock_operators.CustomOpLink object>', '<tests.test_utils.mock_operators.CustomBaseIndexOpLink object>'], 'hooks': ['tests.plugins.test_plugin.PluginHook'], 'listeners': ['tests.listeners.empty_listener'], 'source': None, 'appbuilder_menu_items': [{'name': 'Google', 'href': 'https://www.google.com', 'category': 'Search'}, {'name': 'apache', 'href': 'https://www.apache.org/', 'label': 'The Apache Software Foundation'}], 'ti_deps': ['<TIDep(CustomTestTriggerRule)>']}])
    get_listener_manager().clear()
@mock_plugin_manager(plugins=[ComplexAirflowPlugin])
def test_should_display_one_plugins(self):
    with redirect_stdout(io.StringIO()) as temp_stdout:
        plugins_command.dump_plugins(self.parser.parse_args(['plugins', '--output=json']))
        stdout = temp_stdout.getvalue()
    print(stdout)
    info = json.loads(stdout)
    assert (info == [{'name': 'test_plugin', 'macros': ['tests.plugins.test_plugin.plugin_macro'], 'executors': ['tests.plugins.test_plugin.PluginExecutor'], 'flask_blueprints': ["<flask.blueprints.Blueprint: name='test_plugin' import_name='tests.plugins.test_plugin'>"], 'appbuilder_views': [{'name': 'Test View', 'category': 'Test Plugin', 'view': 'tests.plugins.test_plugin.PluginTestAppBuilderBaseView'}], 'global_operator_extra_links': ['<tests.test_utils.mock_operators.AirflowLink object>', '<tests.test_utils.mock_operators.GithubLink object>'], 'timetables': ['tests.plugins.test_plugin.CustomCronDataIntervalTimetable'], 'operator_extra_links': ['<tests.test_utils.mock_operators.GoogleLink object>', '<tests.test_utils.mock_operators.AirflowLink2 object>', '<tests.test_utils.mock_operators.CustomOpLink object>', '<tests.test_utils.mock_operators.CustomBaseIndexOpLink object>'], 'hooks': ['tests.plugins.test_plugin.PluginHook'], 'listeners': ['tests.listeners.empty_listener'], 'source': None, 'appbuilder_menu_items': [{'name': 'Google', 'href': 'https://www.google.com', 'category': 'Search'}, {'name': 'apache', 'href': 'https://www.apache.org/', 'label': 'The Apache Software Foundation'}], 'ti_deps': ['<TIDep(CustomTestTriggerRule)>']}])
    get_listener_manager().clear()