| 187 | |
| 188 | |
| 189 | def test_headers(): |
| 190 | s = serverplayback.ServerPlayback() |
| 191 | with taddons.context(s) as tctx: |
| 192 | tctx.configure(s, server_replay_use_headers=["foo"]) |
| 193 | |
| 194 | r = tflow.tflow(resp=True) |
| 195 | r.request.headers["foo"] = "bar" |
| 196 | r2 = tflow.tflow(resp=True) |
| 197 | assert not s._hash(r) == s._hash(r2) |
| 198 | r2.request.headers["foo"] = "bar" |
| 199 | assert s._hash(r) == s._hash(r2) |
| 200 | r2.request.headers["oink"] = "bar" |
| 201 | assert s._hash(r) == s._hash(r2) |
| 202 | |
| 203 | r = tflow.tflow(resp=True) |
| 204 | r2 = tflow.tflow(resp=True) |
| 205 | assert s._hash(r) == s._hash(r2) |
| 206 | |
| 207 | |
| 208 | def test_load(): |