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

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

src/s/c/scrapelib-0.9.1/scrapelib/tests/test_cache.py   scrapelib(Download)
    # non-get methods
    for method in ('post', 'head', 'put', 'delete', 'patch'):
        assert_equal(cs.key_for_request(method, DUMMY_URL), None)
 
    # simple get method
    assert_equal(cs.key_for_request('get', DUMMY_URL), DUMMY_URL)
    # now with params
    assert_equal(cs.key_for_request('get', DUMMY_URL, params={'foo': 'bar'}),
                 DUMMY_URL + '?foo=bar')
    # params in both places
    assert_equal(cs.key_for_request('get', DUMMY_URL + '?abc=def',
                                    params={'foo': 'bar'}),
                 DUMMY_URL + '?abc=def&foo=bar')

src/s/c/scrapelib-HEAD/scrapelib/tests/test_cache.py   scrapelib(Download)
    # non-get methods
    for method in ('post', 'head', 'put', 'delete', 'patch'):
        assert cs.key_for_request(method, DUMMY_URL) is None
 
    # simple get method
    assert cs.key_for_request('get', DUMMY_URL) == DUMMY_URL
    # now with params
    assert cs.key_for_request('get', DUMMY_URL, params={'foo': 'bar'}) == DUMMY_URL + '?foo=bar'
    # params in both places
    assert (cs.key_for_request('get', DUMMY_URL + '?abc=def', params={'foo': 'bar'}) ==