Skip to content

Commit

Permalink
rename belongs_to to belongsTo as per the API spec.
Browse files Browse the repository at this point in the history
fixes lp#949554

Change-Id: Ia24dda7e9aa8e075861029dd5edeafd01c9d89c2
  • Loading branch information
hub-cap committed Mar 8, 2012
1 parent 5231d3c commit e422567
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions keystone/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def validate_token_head(self, context, token_id):
Identical to ``validate_token``, except does not return a response.
"""
belongs_to = context['query_string'].get("belongs_to")
belongs_to = context['query_string'].get("belongsTo")
assert self._get_token_ref(context, token_id, belongs_to)

# admin only
Expand All @@ -390,7 +390,7 @@ def validate_token(self, context, token_id):
Returns metadata about the token along any associated roles.
"""
belongs_to = context['query_string'].get("belongs_to")
belongs_to = context['query_string'].get("belongsTo")
token_ref = self._get_token_ref(context, token_id, belongs_to)

# TODO(termie): optimize this call at some point and put it into the
Expand Down
2 changes: 1 addition & 1 deletion tests/test_content_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def test_validate_token(self):

def test_validate_token_belongs_to(self):
token = self.get_scoped_token()
path = ('/v2.0/tokens/%s?belongs_to=%s'
path = ('/v2.0/tokens/%s?belongsTo=%s'
% (token, self.tenant_bar['name']))
r = self.admin_request(path=path,token=token)
self.assertValidAuthenticationResponse(r,
Expand Down

0 comments on commit e422567

Please sign in to comment.