'BlockingConnection: ConnectionClosed raised when creating exchange with invalid type'

def test(self):

    connection = self._connect()
    ch = connection.channel()
    exg_name = ('TestInvalidExchangeTypeRaisesConnectionClosed_' + uuid.uuid1().hex)
    with self.assertRaises(pika.exceptions.ConnectionClosed) as ex_cm:
        ch.exchange_declare(exg_name, exchange_type='ZZwwInvalid')
    self.assertEqual(ex_cm.exception.args[0], 503)
