Home | History | Annotate | Download | only in tests
      1 from paste.response import *
      2 
      3 def test_replace_header():
      4     h = [('content-type', 'text/plain'),
      5          ('x-blah', 'foobar')]
      6     replace_header(h, 'content-length', '10')
      7     assert h[-1] == ('content-length', '10')
      8     replace_header(h, 'Content-Type', 'text/html')
      9     assert ('content-type', 'text/html') in h
     10     assert ('content-type', 'text/plain') not in h
     11 
     12