Add basic test for advertising a topic.

While we are at it, switch to the pytest primitives instead of
unittest.  This makes it easier to use the same mock override for a
large number of test cases without having to add custom code in every
test case.
Add a simple test for subscribing.