'Email addresses are properly sanitized.'

def test_sanitize_address(self):

    self.assertEqual(sanitize_address('to@example.com', 'ascii'), 'to@example.com')
    self.assertEqual(sanitize_address('to@example.com', 'utf-8'), 'to@example.com')
    self.assertEqual(sanitize_address(('A    name', 'to@example.com'), 'ascii'), 'A    name    <to@example.com>')
    self.assertEqual(sanitize_address(('A    name', 'to@example.com'), 'utf-8'), '=?utf-8?q?A_name?=    <to@example.com>')
    self.assertEqual(sanitize_address('t\xc3\xb3@example.com', 'utf-8'), '=?utf-8?b?dMOz?=@example.com')
    self.assertEqual(sanitize_address(('T\xc3\xb3    Example', 't\xc3\xb3@example.com'), 'utf-8'), '=?utf-8?q?T=C3=B3_Example?=    <=?utf-8?b?dMOz?=@example.com>')
