def METHOD_NAME(config_stub, fake_save_manager):
    """Test that expired cookies are deleted."""
    line_parser_stub = [COOKIE1, COOKIE2, SESSION_COOKIE, EXPIRED_COOKIE]
    jar = cookies.CookieJar(line_parser=line_parser_stub)
    assert len(jar.allCookies()) == 4
    jar.purge_old_cookies()
    # Test that old cookies are gone
    raw_cookies = [cookie.toRawForm().data() for cookie in jar.allCookies()]
    assert raw_cookies == [COOKIE1, COOKIE2, SESSION_COOKIE]