(self, url, sess)
| 39 | assert r.from_cache is True |
| 40 | |
| 41 | def test_stream_is_cached(self, url, sess): |
| 42 | resp_1 = sess.get(url + "stream") |
| 43 | content_1 = resp_1.content |
| 44 | |
| 45 | resp_2 = sess.get(url + "stream") |
| 46 | content_2 = resp_1.content |
| 47 | |
| 48 | assert not resp_1.from_cache |
| 49 | assert resp_2.from_cache |
| 50 | assert content_1 == content_2 |
| 51 | |
| 52 | def test_stream_is_not_cached_when_content_is_not_read(self, url, sess): |
| 53 | sess.get(url + "stream", stream=True) |