@pytest.fixture
def function_loader():
 return loaders.FunctionLoader({'justfunction.html': 'FOO'}.get)

@ pytest . fixture def function_loader ( ) : return loaders . FunctionLoader ( { 'justfunction.html' : 'FOO' } . get )
returns a functionloader .