summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-01-11 19:49:59 +0000
committerGerrit Code Review <review@openstack.org>2016-01-11 19:50:00 +0000
commit4a5a34d77c1727daa039458e7f46fa198d053f11 (patch)
treebb185b1496aadeef66b5360d589cdaf5ca86b629 /openstackclient/tests
parent9317df07a2057df8985e2882dd88633a13ba9bf3 (diff)
parent5cbecc130ef2aacd5d9bd265b814e6f8140374f9 (diff)
downloadpython-openstackclient-4a5a34d77c1727daa039458e7f46fa198d053f11.tar.gz
Merge "Support non-interactive user password update"
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/identity/v3/test_user.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/openstackclient/tests/identity/v3/test_user.py b/openstackclient/tests/identity/v3/test_user.py
index 76d5f834..41fab60e 100644
--- a/openstackclient/tests/identity/v3/test_user.py
+++ b/openstackclient/tests/identity/v3/test_user.py
@@ -1095,6 +1095,25 @@ class TestUserSetPassword(TestUser):
current_pass, new_pass
)
+ def test_user_password_change_no_prompt(self):
+ current_pass = 'old_pass'
+ new_pass = 'new_pass'
+ arglist = [
+ '--password', new_pass,
+ '--original-password', current_pass,
+ ]
+ verifylist = [
+ ('password', new_pass),
+ ('original_password', current_pass),
+ ]
+ parsed_args = self.check_parser(self.cmd, arglist, verifylist)
+
+ self.cmd.take_action(parsed_args)
+
+ self.users_mock.update_password.assert_called_with(
+ current_pass, new_pass
+ )
+
class TestUserShow(TestUser):