It depends on what one is trying to test. For simple connectivity, sure. If one wants to test more advanced features, this could be not enough.
By the way, it’s possible to run entire cluster in tests. Here’s an (older) example: https://github.com/radekg/kafka-cluster-tools.