summaryrefslogtreecommitdiffstats
path: root/snaps/tests
diff options
context:
space:
mode:
Diffstat (limited to 'snaps/tests')
-rw-r--r--snaps/tests/file_utils_tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/snaps/tests/file_utils_tests.py b/snaps/tests/file_utils_tests.py
index a28231b..62d96e8 100644
--- a/snaps/tests/file_utils_tests.py
+++ b/snaps/tests/file_utils_tests.py
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
+import pkg_resources
import unittest
import shutil
import uuid
@@ -95,7 +96,8 @@ class FileUtilsTests(unittest.TestCase):
Tests that the OS Environment file is correctly parsed
:return:
"""
- os_env_dict = file_utils.read_os_env_file('openstack/tests/conf/overcloudrc_test')
+ rc_file_path = pkg_resources.resource_filename('snaps.openstack.tests.conf', 'overcloudrc_test')
+ os_env_dict = file_utils.read_os_env_file(rc_file_path)
self.assertEqual('test_pw', os_env_dict['OS_PASSWORD'])
self.assertEqual('http://foo:5000/v2.0/', os_env_dict['OS_AUTH_URL'])
self.assertEqual('admin', os_env_dict['OS_USERNAME'])