Backward compatibility to credentials in conf

Before switching to the YAML based configuration as the default for
credentials, we need to introduce backward compatibility to allow
credentials to be configured in tempest.conf.

Partially implements bp:test-accounts

Change-Id: I29c66c87d02f442b1d5b0b2d7c82ff2a140c111f
diff --git a/tempest/tests/common/test_accounts.py b/tempest/tests/common/test_accounts.py
index a0b3496..cf7ce65 100644
--- a/tempest/tests/common/test_accounts.py
+++ b/tempest/tests/common/test_accounts.py
@@ -57,6 +57,7 @@
             'tempest.common.accounts.read_accounts_yaml',
             return_value=self.test_accounts))
         cfg.CONF.set_default('test_accounts_file', '', group='auth')
+        self.useFixture(mockpatch.Patch('os.path.isfile', return_value=True))
 
     def _get_hash_list(self, accounts_list):
         hash_list = []
@@ -220,6 +221,7 @@
             'tempest.common.accounts.read_accounts_yaml',
             return_value=self.test_accounts))
         cfg.CONF.set_default('test_accounts_file', '', group='auth')
+        self.useFixture(mockpatch.Patch('os.path.isfile', return_value=True))
 
     def test_get_creds(self):
         test_accounts_class = accounts.NotLockingAccounts('test_name')
@@ -229,4 +231,4 @@
             self.assertIsNotNone(creds, msg)
         self.assertRaises(exceptions.InvalidConfiguration,
                           test_accounts_class.get_creds,
-                          id=len(self.test_accounts))
\ No newline at end of file
+                          id=len(self.test_accounts))