Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/s/c/scrapelib-0.9.1/scrapelib/tests/test_cache.py   scrapelib(Download)
    # only 200 should return True
    resp.status_code = 200
    assert_equal(cs.should_cache_response(resp), True)
    for code in (203, 301, 302, 400, 403, 404, 500):
        resp.status_code = code
        assert_equal(cs.should_cache_response(resp), False)

src/s/c/scrapelib-HEAD/scrapelib/tests/test_cache.py   scrapelib(Download)
    # only 200 should return True
    resp.status_code = 200
    assert cs.should_cache_response(resp) is True
    for code in (203, 301, 302, 400, 403, 404, 500):
        resp.status_code = code
        assert cs.should_cache_response(resp) is False