Merge "py3: port proxy account controller"
This commit is contained in:
commit
d2d6d59d5c
@ -55,7 +55,7 @@ class AccountController(Controller):
|
||||
length_limit = self.get_name_length_limit()
|
||||
if len(self.account_name) > length_limit:
|
||||
resp = HTTPBadRequest(request=req)
|
||||
resp.body = 'Account name length of %d longer than %d' % \
|
||||
resp.body = b'Account name length of %d longer than %d' % \
|
||||
(len(self.account_name), length_limit)
|
||||
# Don't cache this. We know the account doesn't exist because
|
||||
# the name is bad; we don't need to cache that because it's
|
||||
@ -119,7 +119,7 @@ class AccountController(Controller):
|
||||
length_limit = self.get_name_length_limit()
|
||||
if len(self.account_name) > length_limit:
|
||||
resp = HTTPBadRequest(request=req)
|
||||
resp.body = 'Account name length of %d longer than %d' % \
|
||||
resp.body = b'Account name length of %d longer than %d' % \
|
||||
(len(self.account_name), length_limit)
|
||||
return resp
|
||||
account_partition, accounts = \
|
||||
@ -138,7 +138,7 @@ class AccountController(Controller):
|
||||
length_limit = self.get_name_length_limit()
|
||||
if len(self.account_name) > length_limit:
|
||||
resp = HTTPBadRequest(request=req)
|
||||
resp.body = 'Account name length of %d longer than %d' % \
|
||||
resp.body = b'Account name length of %d longer than %d' % \
|
||||
(len(self.account_name), length_limit)
|
||||
return resp
|
||||
error_response = check_metadata(req, 'account')
|
||||
|
1
tox.ini
1
tox.ini
@ -87,6 +87,7 @@ commands =
|
||||
test/unit/obj/test_replicator.py \
|
||||
test/unit/obj/test_server.py \
|
||||
test/unit/obj/test_updater.py \
|
||||
test/unit/proxy/controllers/test_account.py \
|
||||
test/unit/proxy/controllers/test_base.py \
|
||||
test/unit/proxy/controllers/test_container.py \
|
||||
test/unit/proxy/controllers/test_info.py \
|
||||
|
Loading…
Reference in New Issue
Block a user