'A L{Command} subclass\'s C{fatalErrors} must map exceptions to byte
strings.'

def test_commandFatalErrorsMustUseBytesForOnWireRepresentation(self):

    error = self.assertRaises(TypeError, type, 'NewCommand', (amp.Command,), {'fatalErrors': [(ZeroDivisionError, u'foo')]})
    self.assertRegex(str(error), "^Fatal    error    names    must    be    byte    strings,    got:    u?'foo'$")
