def test_register_admin_plugin_menu_bar():
    """
    Test that register_admin_plugin_menu_bar() properly inserts into HTML and get_admin_plugin_menu_bar()
    returns the proper list.
    """
    app = create_ctfd()
    with app.app_context():
        register_admin_plugin_menu_bar(
            title="test_admin_plugin_name", route="/test_plugin"
        )

        client = login_as_user(app, name="admin", password="password")
        r = client.get("/admin/statistics")
        output = r.get_data(as_text=True)
        assert "/test_plugin" in output
        assert "test_admin_plugin_name" in output

        menu_item = get_admin_plugin_menu_bar()[0]
        assert menu_item.title == "test_admin_plugin_name"
        assert menu_item.route == "/test_plugin"
    destroy_ctfd(app)

    Test that register_admin_plugin_menu_bar() properly inserts into HTML and get_admin_plugin_menu_bar()
    returns the proper list.
    
tests/test_plugin_utils.py