Docs: Add unittests, fix KeyErrors, formats and sub-subtest docs.

* Also a bunch of PEP8 cleanups here and in one test

Signed-off-by: Chris Evich <cevich@redhat.com>