def test_save(config_stub, fake_save_manager, monkeypatch, qapp):
 monkeypatch.setattr(lineparser, 'LineParser', LineparserSaveStub)
 jar = cookies.CookieJar()
 jar._lineparser.data = [COOKIE1, COOKIE2, SESSION_COOKIE, EXPIRED_COOKIE]
 jar.parse_cookies()
 jar.save()
 saved_cookies = [cookie.data() for cookie in jar._lineparser.saved]
 assert (saved_cookies == [COOKIE1, COOKIE2])

def test_save ( config_stub , fake_save_manager , monkeypatch , qapp ) : monkeypatch . setattr ( lineparser , 'LineParser' , LineparserSaveStub ) jar = cookies . CookieJar ( ) jar . _lineparser . data = [ COOKIE1 , COOKIE2 , SESSION_COOKIE , EXPIRED_COOKIE ] jar . parse_cookies ( ) jar . save ( ) saved_cookies = [ cookie . data ( ) for cookie in jar . _lineparser . saved ] assert ( saved_cookies == [ COOKIE1 , COOKIE2 ] )
test %save .