diff options
Diffstat (limited to 'tests/test_backend_memcache.py')
-rw-r--r-- | tests/test_backend_memcache.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_backend_memcache.py b/tests/test_backend_memcache.py index 2c07580b..f18cc9ca 100644 --- a/tests/test_backend_memcache.py +++ b/tests/test_backend_memcache.py @@ -14,13 +14,13 @@ # License for the specific language governing permissions and limitations # under the License. -import datetime -import time import uuid import memcache +from keystone.common import utils from keystone import exception +from keystone.openstack.common import timeutils from keystone import test from keystone.token.backends import memcache as token_memcache @@ -42,7 +42,7 @@ class MemcacheClient(object): """Retrieves the value for a key or None.""" self.check_key(key) obj = self.cache.get(key) - now = time.mktime(datetime.datetime.utcnow().utctimetuple()) + now = utils.unixtime(timeutils.utcnow()) if obj and (obj[1] == 0 or obj[1] > now): return obj[0] else: |