def test_expired_etags_if_none_match_response(self, sess):
        # get our response
        r = sess.get(self.etag_url)

        # expire our request by changing the date. Our test endpoint
        # doesn't provide time base caching headers, so we add them
        # here in order to expire the request.
        r.headers['Date'] = 'Tue, 26 Nov 2012 00:50:49 GMT'
        self.cache.set(self.etag_url, r.raw)

        r = sess.get(self.etag_url)
        assert r.from_cache
        assert 'if-none-match' in r.request.headers
        assert r.status_code == 200
Make sure an expired response that contains an ETag uses
dataset/ETHPy150Open ionrock/cachecontrol/tests/test_etag.py/TestDisabledETags.test_expired_etags_if_none_match_response