From 71436dbf188b3ff1c576fcd54b992530aac98b6c Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Wed, 8 Feb 2012 16:08:08 -0800 Subject: Add token expiration * Config option token.expiration defines amount of time tokens should be valid * Fixes bug 928545 Change-Id: I3dff7a1ebf03bb44fc6e5247f976baea0581de08 --- tests/test_utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_utils.py') diff --git a/tests/test_utils.py b/tests/test_utils.py index 81cec7c9..7409e30c 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -15,6 +15,8 @@ # License for the specific language governing permissions and limitations # under the License. +import datetime + from keystone import test from keystone.common import utils @@ -38,3 +40,10 @@ class UtilsTestCase(test.TestCase): hashed = utils.hash_password(password) self.assertTrue(utils.check_password(password, hashed)) self.assertFalse(utils.check_password(wrong, hashed)) + + def test_isotime(self): + dt = datetime.datetime(year=1987, month=10, day=13, + hour=1, minute=2, second=3) + output = utils.isotime(dt) + expected = '1987-10-13T01:02:03Z' + self.assertEqual(output, expected) -- cgit