Make tests in pubsub.py pass

* Fix another issue in client.py
* Update tests