@pytest.fixture
def app_stub(stubs):
 stub = stubs.ApplicationStub()
 objreg.register('app', stub)
 (yield stub)
 objreg.delete('app')

@ pytest . fixture def app_stub ( stubs ) : stub = stubs . ApplicationStub ( ) objreg . register ( 'app' , stub ) ( yield stub ) objreg . delete ( 'app' )
fixture which provides a fake app object .