diff options
author | Brian Waldon <bcwaldon@gmail.com> | 2012-02-08 16:08:08 -0800 |
---|---|---|
committer | Brian Waldon <bcwaldon@gmail.com> | 2012-02-14 14:18:50 -0800 |
commit | 71436dbf188b3ff1c576fcd54b992530aac98b6c (patch) | |
tree | 98c28015635a15ab497e84fa5a0a73c8e484615d /tests/test_utils.py | |
parent | 1ed067cb5791585bb02644a4a3827b6640324a95 (diff) | |
download | keystone-71436dbf188b3ff1c576fcd54b992530aac98b6c.tar.gz keystone-71436dbf188b3ff1c576fcd54b992530aac98b6c.tar.xz keystone-71436dbf188b3ff1c576fcd54b992530aac98b6c.zip |
Add token expiration
* Config option token.expiration defines amount of time tokens should be valid
* Fixes bug 928545
Change-Id: I3dff7a1ebf03bb44fc6e5247f976baea0581de08
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
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) |