@pytest.fixture
def cookiejar_and_cache(stubs):
 jar = QNetworkCookieJar()
 ram_jar = cookies.RAMCookieJar()
 cache = stubs.FakeNetworkCache()
 objreg.register('cookie-jar', jar)
 objreg.register('ram-cookie-jar', ram_jar)
 objreg.register('cache', cache)
 (yield)
 objreg.delete('cookie-jar')
 objreg.delete('ram-cookie-jar')
 objreg.delete('cache')

@ pytest . fixture def cookiejar_and_cache ( stubs ) : jar = QNetworkCookieJar ( ) ram_jar = cookies . RAMCookieJar ( ) cache = stubs . FakeNetworkCache ( ) objreg . register ( 'cookie-jar' , jar ) objreg . register ( 'ram-cookie-jar' , ram_jar ) objreg . register ( 'cache' , cache ) ( yield ) objreg . delete ( 'cookie-jar' ) objreg . delete ( 'ram-cookie-jar' ) objreg . delete ( 'cache' )
fixture providing a fake cookie jar and cache .