def test_format_header_handles_unicode(self):
     """Prove that _format_header correctly formats text input."""
     header = b'Connection'.decode('utf-8')
     value = b'close'.decode('utf-8')
     expected = b'Connection: close\r\n'
     assert dump._format_header(header, value) == expected
 def test_format_header(self):
     """Prove that _format_header correctly formats bytes input."""
     header = b'Connection'
     value = b'close'
     expected = b'Connection: close\r\n'
     assert dump._format_header(header, value) == expected