summaryrefslogtreecommitdiffstats
path: root/tests/unit/post/test_keystoneauth.py
diff options
context:
space:
mode:
authorzhongjun <zhong.jun@zte.com.cn>2017-09-21 09:40:12 +0800
committerzhongjun <zhong.jun@zte.com.cn>2017-09-21 17:07:05 +0800
commitfc12fe83562430bc406877583111ed725d08edc8 (patch)
tree22b90d93b501c9f4d73214b453105d4584bde683 /tests/unit/post/test_keystoneauth.py
parent2045ccff6a31ce649cfabc0ba896e9d0d708e3e0 (diff)
Add some unittest files such as test_nova.py
1.Add test_glance.py, test_neutron.py and test_nova.py unittest files, and modify the neutron.py to adapt the unittest. 2.Add some unittest functions in test_post_execute.py, test_deploy.py, test_keystoneauth.py. 3.rename test_prepare_execure.py to test_prepare_execute.py. Change-Id: Ie0640d133e27c558648416a6a5cf044a00ffa67f Signed-off-by: zhongjun <zhong.jun@zte.com.cn>
Diffstat (limited to 'tests/unit/post/test_keystoneauth.py')
-rw-r--r--tests/unit/post/test_keystoneauth.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/post/test_keystoneauth.py b/tests/unit/post/test_keystoneauth.py
index 1ae86452..1a3021ee 100644
--- a/tests/unit/post/test_keystoneauth.py
+++ b/tests/unit/post/test_keystoneauth.py
@@ -102,3 +102,13 @@ def test__parse_openrc(openrc_conf_file_dir, openrc_file_name, expected):
KeystoneClient = Keystoneauth(openrc)
ret_openrc_dict = KeystoneClient._parse_openrc()
assert expected == ret_openrc_dict
+
+
+@pytest.mark.parametrize('openrc_file_name', [
+ (
+ 'admin-openrc.sh'
+ )])
+def test__get_auth(openrc_conf_file_dir, openrc_file_name,):
+ openrc = os.path.join(openrc_conf_file_dir, openrc_file_name)
+ KeystoneClient = Keystoneauth(openrc)
+ assert KeystoneClient._get_auth()