Added "isTruncated" attribute for listUsersResponse (#4017)
* isTruncated attribute for listUsersResponse * correction and test
This commit is contained in:
parent
a95ca81e76
commit
e4057a34b9
@ -494,7 +494,7 @@ class IamResponse(BaseResponse):
|
||||
max_items = self._get_param("MaxItems")
|
||||
users = iam_backend.list_users(path_prefix, marker, max_items)
|
||||
template = self.response_template(LIST_USERS_TEMPLATE)
|
||||
return template.render(action="List", users=users)
|
||||
return template.render(action="List", users=users, isTruncated=False)
|
||||
|
||||
def update_user(self):
|
||||
user_name = self._get_param("UserName")
|
||||
@ -1725,6 +1725,7 @@ USER_TEMPLATE = """<{{ action }}UserResponse>
|
||||
|
||||
LIST_USERS_TEMPLATE = """<{{ action }}UsersResponse>
|
||||
<{{ action }}UsersResult>
|
||||
<IsTruncated>{{ isTruncated }}</IsTruncated>
|
||||
<Users>
|
||||
{% for user in users %}
|
||||
<member>
|
||||
|
@ -808,6 +808,7 @@ def test_list_users():
|
||||
user["UserName"].should.equal("my-user")
|
||||
user["Path"].should.equal("/")
|
||||
user["Arn"].should.equal("arn:aws:iam::{}:user/my-user".format(ACCOUNT_ID))
|
||||
response["IsTruncated"].should.equal(False)
|
||||
|
||||
conn.create_user(UserName="my-user-1", Path="myUser")
|
||||
response = conn.list_users(PathPrefix="my")
|
||||
|
Loading…
Reference in New Issue
Block a user