@pytest.fixture
def key_config_stub(stubs):
 stub = stubs.KeyConfigStub()
 objreg.register('key-config', stub)
 (yield stub)
 objreg.delete('key-config')

@ pytest . fixture def key_config_stub ( stubs ) : stub = stubs . KeyConfigStub ( ) objreg . register ( 'key-config' , stub ) ( yield stub ) objreg . delete ( 'key-config' )
fixture which provides a fake key config object .