'The L{repr} of a L{Headers} instance shows the names and values of all
the headers it contains. This shows only reprs of bytes values, as
undecodable headers may cause an exception.'

def test_repr(self):

    foo = u'foo\xe1'
    bar = u'bar\u2603'
    baz = u'baz'
    fooEncoded = "'foo\\xe1'"
    barEncoded = "'bar\\xe2\\x98\\x83'"
    if _PY3:
        fooEncoded = ('b' + fooEncoded)
        barEncoded = ('b' + barEncoded)
    self.assertEqual(repr(Headers({foo: [bar, baz]})), ('Headers({%s:    [%s,    %r]})' % (fooEncoded, barEncoded, baz.encode('utf8'))))
