def test_commandResponseMustBeNamedWithByteStrings(self):
        """
        A L{Command} subclass's C{response} must have byte string names.
        """
        error = self.assertRaises(
            TypeError, type, "NewCommand", (amp.Command, ),
            {"response": [(u"foo", None)]})
        self.assertRegex(
            str(error), "^Response names must be byte strings, got: u?'foo'$")

        A L{Command} subclass's C{response} must have byte string names.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_amp.py