def test_set_cookies_never_accept(qtbot, config_stub):
 config_stub.data = CONFIG_NEVER_COOKIES
 ram_jar = cookies.RAMCookieJar()
 url = QUrl('http://example.com/')
 with qtbot.assertNotEmitted(ram_jar.changed):
  assert (not ram_jar.setCookiesFromUrl(url, 'test'))
 assert (not ram_jar.cookiesForUrl(url))

def test_set_cookies_never_accept ( qtbot , config_stub ) : config_stub . data = CONFIG_NEVER_COOKIES ram_jar = cookies . RAMCookieJar ( ) url = QUrl ( 'http://example.com/' ) with qtbot . assertNotEmitted ( ram_jar . changed ) : assert ( not ram_jar . setCookiesFromUrl ( url , 'test' ) ) assert ( not ram_jar . cookiesForUrl ( url ) )
test setcookiesfromurl when cookies are not accepted .