def test_subdomain(self):
        """
        L{dns._nameToLabels} returns a list containing entries
        for all labels in a subdomain name.
        """
        self.assertEqual(
            dns._nameToLabels(b'foo.bar.baz.example.com.'),
            [b'foo', b'bar', b'baz', b'example', b'com', b''])

        L{dns._nameToLabels} returns a list containing entries
        for all labels in a subdomain name.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py