def test_bytestring(self): addr = Address('Foo <foo@exámple.test>'.encode('utf-8')) assert bytes(addr) == b'Foo <*****@*****.**>'
def test_bytes(self): self.addresses = [('User1', 'foo@exámple.test'), ('User2', 'foo@exámple.test')] assert bytes(self.addresses) == b'User1 <*****@*****.**>, User2 <*****@*****.**>'
def test_punycode(self): addr = Address('Foo', 'foo@exámple.test') assert bytes(addr) == b'Foo <*****@*****.**>'