Otherwise a TypeError, not understandable for the user, is raised. This
happens for example when using tempest account-generator with no
identity uri defined in the config file.
Also added unit tests for this specific case.
Change-Id: Ia8d523f973240300e0010b9b28f5ee63b2b84341