Add unit tests to check for CONF getattr during import

Since the early days in tempest we've been fighting getattrs on CONF
during imports. We're able to get around this during test runs by lazy
loading the conf file. However, in things like the tempest commands this
doesn't work because we rely on the config file not being parsed to set
the config file path. This commit adds unit tests to check the import
of the command files for getattrs on CONF. This should prevent future
regressions.

While not strictly necessary because of the lazy loading this also gives
a framework to potentially address the CONF getatrr on discovery. The
first revision of this patch includes the discovery test, for reference.
But we have 212 cases of getattr during import (which includes lots of
skip decorators) so it's unlikely to change any time soon.

Change-Id: Ib2c15dbd06ca810cc899258758cc8a297055fdf8
Closes-Bug: #1726357
1 file changed