Fix test for code change

Commit c800b2d811aa5201b8d2e9851b0032073e3ccb25
changed some logging from verbose to debug and this test needed
corresponding changes.
There were some other problems in the test that I also fixed.