def test_unicodeName(self):
        """
        L{dns.Name} automatically encodes unicode domain name using C{idna}
        encoding.
        """
        name = dns.Name(u'\u00e9chec.example.org')
        self.assertIsInstance(name.name, bytes)
        self.assertEqual(b'xn--chec-9oa.example.org', name.name)

        L{dns.Name} automatically encodes unicode domain name using C{idna}
        encoding.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py