From 3fe954992b53a24e9816b4ed6c4cb8b98b57e345 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sun, 19 Oct 2014 10:49:12 +0200 Subject: TESTS: Add a chpass test to krb5_child --- src/tests/cwrap/test_krb5_child.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/tests/cwrap') diff --git a/src/tests/cwrap/test_krb5_child.py b/src/tests/cwrap/test_krb5_child.py index 50f273483..b97c93ea5 100755 --- a/src/tests/cwrap/test_krb5_child.py +++ b/src/tests/cwrap/test_krb5_child.py @@ -63,6 +63,25 @@ class Krb5ChildTest(unittest.TestCase): child_test.communicate() self.assertEqual(child_test.returncode, 6) + #def testChpass(self): + # username = 'foobar' + + # oldpass = self.users[username] + # self.users[username] = 'ThisIsANewPassword' + + # child_test = subprocess.Popen([test_bin, '--chpass', '-u', username, + # '-w', oldpass, + # '--new-password', self.users[username], + # '-r', self.realm, + # '--debug', '10', + # '-c', 'FILE:%s' % self.ccache_path(username), + # '-k'], + # env = self.env) + # child_test.communicate() + # self.assertEqual(child_test.returncode, 0) + # self.assertPrincipalInCcache(self.principal(username, self.realm), + # self.ccache_path(username)) + def assertPrincipalInCcache(self, principal, ccache): klist = subprocess.Popen(['klist', ccache], stdout=subprocess.PIPE) klist.communicate() -- cgit