def METHOD_NAME(self):
    """
    Context manager that patches get_available_plugins to return test plugins.
    """
    patcher = mock.patch("openedx.core.djangoapps.course_apps.plugins.PluginManager.get_available_plugins")
    mock_get_available_plugins = patcher.start()
    mock_get_available_plugins.return_value = {
        "app1": make_test_course_app(app_id="app1", name="App One", is_available=True),
        "app2": make_test_course_app(app_id="app2", name="App Two", is_available=True),
        "app3": make_test_course_app(app_id="app3", name="App Three", is_available=False),
        "app4": make_test_course_app(app_id="app4", name="App Four", is_available=True),
    }
    yield
    patcher.stop()