clean up unit test

Fixed lots of minor bugs in the unit test for web services. Running osbuild check reports no errors.