@pytest.fixture
def config_stub(stubs):
 stub = stubs.ConfigStub()
 objreg.register('config', stub)
 (yield stub)
 objreg.delete('config')

@ pytest . fixture def config_stub ( stubs ) : stub = stubs . ConfigStub ( ) objreg . register ( 'config' , stub ) ( yield stub ) objreg . delete ( 'config' )
fixture which provides a fake config object .