URL: https://github.com/freeipa/freeipa/pull/705 Author: redhatrises Title: #705: ipatests: Add krbpasswordexpiration tests Action: synchronized
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/705/head:pr705 git checkout pr705
From d86f8bb2f4a9d39d5f467c1f224ad9515423af33 Mon Sep 17 00:00:00 2001 From: Gabe <redhatri...@gmail.com> Date: Mon, 10 Apr 2017 10:54:03 -0600 Subject: [PATCH] ipatests: Add krbpasswordexpiration tests --- ipatests/test_xmlrpc/test_user_plugin.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ipatests/test_xmlrpc/test_user_plugin.py b/ipatests/test_xmlrpc/test_user_plugin.py index 098163d..716b292 100644 --- a/ipatests/test_xmlrpc/test_user_plugin.py +++ b/ipatests/test_xmlrpc/test_user_plugin.py @@ -68,6 +68,7 @@ u'en-us;q=0.1234', u'en-us;q=1.1', u'en-us;q=1.0000' } +password_expiration_now = datetime.datetime.utcnow() principal_expiration_string = "2020-12-07T19:54:13Z" principal_expiration_date = datetime.datetime(2020, 12, 7, 19, 54, 13) @@ -439,6 +440,22 @@ def test_set_random_password(self, user): ) user.delete() + def test_set_immediate_password_expiration(self, user): + """ Set immediate password expiration for user """ + user.ensure_exists() + user.update( + dict(krbpasswordexpiration=u'now'), + dict(krbpasswordexpiration=[password_expiration_now]) + ) + + def test_set_delayed_password_expiration(self, user): + """ Set delayed expiration for user """ + user.ensure_exists() + user.update( + dict(krbpasswordexpiration=principal_expiration_string), + dict(krbpasswordexpiration=[principal_expiration_date]) + ) + def test_rename_to_invalid_login(self, user): """ Try to change user login to an invalid value """ user.ensure_exists()
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code