def METHOD_NAME(self):
    self.nats_client.is_connected = False
    with self.assertRaises(TTransportException) as cm:
        yield self.publisher_transport.publish('foo', [])
    self.assertEquals(
        TTransportExceptionType.NOT_OPEN, cm.exception.type)
    self.assertEquals("Nats not connected!", cm.exception.message)