diff options
author | Adam Young <ayoung@redhat.com> | 2013-03-27 12:10:08 -0400 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-04-12 17:51:33 +0000 |
commit | a62d3afae43ebe191fe86f8d1ebed3e8bfaeba17 (patch) | |
tree | 0e2cd4b5b16d5dbb871de98cf6ff5a3f06c30d35 /tests/test_backend.py | |
parent | a75e1128f442c0436a3ef669a24c639f74df0f97 (diff) | |
download | keystone-a62d3afae43ebe191fe86f8d1ebed3e8bfaeba17.tar.gz keystone-a62d3afae43ebe191fe86f8d1ebed3e8bfaeba17.tar.xz keystone-a62d3afae43ebe191fe86f8d1ebed3e8bfaeba17.zip |
Fix token ids for memcached
Bug 1119641
Change-Id: Ia22764acc69a272b37364193d10c553a48679b9a
Diffstat (limited to 'tests/test_backend.py')
-rw-r--r-- | tests/test_backend.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py index 6768e9c5..a7344067 100644 --- a/tests/test_backend.py +++ b/tests/test_backend.py @@ -1949,8 +1949,14 @@ class IdentityTests(object): class TokenTests(object): + def _create_token_id(self): + token_id = "" + for i in range(1, 20): + token_id += uuid.uuid4().hex + return token_id + def test_token_crud(self): - token_id = uuid.uuid4().hex + token_id = self._create_token_id() data = {'id': token_id, 'a': 'b', 'trust_id': None, 'user': {'id': 'testuserid'}} @@ -1974,7 +1980,7 @@ class TokenTests(object): self.token_api.delete_token, token_id) def create_token_sample_data(self, tenant_id=None, trust_id=None): - token_id = uuid.uuid4().hex + token_id = self._create_token_id() data = {'id': token_id, 'a': 'b', 'user': {'id': 'testuserid'}} if tenant_id is not None: |