Fix test nits
Fix test nits

Mostly adding length checks and converting a few checks to provide more
friendly errors.

https://bugs.launchpad.net/juju-core/+bug/1570096

ericsnowcurrently/juju,frankban/juju,marcmolla/juju,mjs/juju,gabriel-samfira/juju,reedobrien/juju,dimitern/juju,dimitern/juju,macgreagoir/juju,mikemccracken/juju,alesstimec/juju,AdamIsrael/juju,ericsnowcurrently/juju,macgreagoir/juju,marcmolla/juju,bac/juju,ericsnowcurrently/juju,perrito666/juju,frankban/juju,ericsnowcurrently/juju,dimitern/juju,AdamIsrael/juju,axw/juju,perrito666/juju,ericsnowcurrently/juju,alesstimec/juju,alesstimec/juju,bac/juju,axw/juju,kat-co/juju,bz2/juju,howbazaar/juju,gabriel-samfira/juju,frankban/juju,anastasiamac/juju,alesstimec/juju,anastasiamac/juju,perrito666/juju,bac/juju,reedobrien/juju,waigani/juju,gabriel-samfira/juju,perrito666/juju,mjs/juju,kat-co/juju,gabriel-samfira/juju,AdamIsrael/juju,howbazaar/juju,bz2/juju,anastasiamac/juju,waigani/juju,dimitern/juju,mjs/juju,mjs/juju,bac/juju,reedobrien/juju,AdamIsrael/juju,macgreagoir/juju,frankban/juju,frankban/juju,mjs/juju,kat-co/juju,mikemccracken/juju,mikemccracken/juju,marcmolla/juju,mikemccracken/juju,howbazaar/juju,axw/juju,marcmolla/juju,howbazaar/juju,kat-co/juju,dimitern/juju,anastasiamac/juju,reedobrien/juju,bz2/juju,macgreagoir/juju,mjs/juju,waigani/juju,bac/juju,howbazaar/juju,macgreagoir/juju,anastasiamac/juju,mikemccracken/juju,bz2/juju,waigani/juju,mjs/juju,gabriel-samfira/juju,axw/juju,perrito666/juju,axw/juju,reedobrien/juju,alesstimec/juju,kat-co/juju,marcmolla/juju,bz2/juju