Fix test_get_config_file to always work

This patch set changes logic in test_get_config_file which
is currently referencing environment variables for test
execution, but this leads to non-deterministic behavior.
Tests are failing sometimes (e.g. [0]) because of cross-pollination
between tests, meaning that one test can change the value of
os.environ['TEMPEST_CONFIG_DIR'] (for example) causing this
test to fail. To make the test always pass, the same
values are always returned via mocking.

This assumes that tempest/etc exists which is a valid
assumption since it should always be in the repo [1].

[0] http://logs.openstack.org/30/577730/17/check/openstack-tox-py36/207ab05/testr_results.html.gz
[1] https://github.com/openstack/tempest/tree/dfe511eef288dc36d8de18f0ccd081dfc6c534f6/etc

Change-Id: I5e3b608b8813e33cc45a2d45e384a4cf91a01a39
Closes-Bug: #1796073
1 file changed