MCPcopy Create free account
hub / github.com/psf/cachecontrol / test_no_vary_header

Method test_no_vary_header

tests/test_serialization.py:85–96  ·  view source on GitHub ↗
(self, url)

Source from the content-addressed store, hash-verified

83 assert resp.read() == data
84
85 def test_no_vary_header(self, url):
86 original_resp = requests.get(url)
87 data = original_resp.content
88 req = original_resp.request
89
90 # We make sure our response has a Vary header and that the
91 # request doesn't have the header.
92 original_resp.raw.headers["vary"] = "Foo"
93
94 assert self.serializer.loads(
95 req, self.serializer.dumps(req, original_resp.raw, data)
96 )
97
98 def test_no_body_creates_response_file_handle_on_dumps(self, url):
99 original_resp = requests.get(url, stream=True)

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
loadsMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected