@pytest.fixture
def host_blocker_stub(stubs):
 stub = stubs.HostBlockerStub()
 objreg.register('host-blocker', stub)
 (yield stub)
 objreg.delete('host-blocker')

@ pytest . fixture def host_blocker_stub ( stubs ) : stub = stubs . HostBlockerStub ( ) objreg . register ( 'host-blocker' , stub ) ( yield stub ) objreg . delete ( 'host-blocker' )
fixture which provides a fake host blocker object .