def METHOD_NAME(test_filename):
    """Tests that the Python loader plug-ins write to the RAM cache."""
    # Ensure a clean slate.
    from panda3d.core import ModelPool
    ModelPool.release_all_models()
    with registered_type(DummyLoader):
        model1 = Loader.get_global_ptr().load_sync(test_filename, LoaderOptions(LoaderOptions.LF_no_disk_cache | LoaderOptions.LF_allow_instance))
        assert model1 is not None
        assert model1.name == "loaded"
        assert ModelPool.has_model(test_filename)
        assert ModelPool.get_model(test_filename, True) == model1
        model2 = Loader.get_global_ptr().load_sync(test_filename, LoaderOptions(LoaderOptions.LF_cache_only | LoaderOptions.LF_allow_instance))
        assert model2 is not None
        assert model1 == model2
        ModelPool.release_model(model2)