[fix] cognito-idp list_users Filter arg now support spaces (#3317)

This commit is contained in:
Guy Moses 2020-09-19 13:26:01 +03:00 committed by GitHub
parent cc0bd5213f
commit 7ce1e87477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -287,7 +287,7 @@ class CognitoIdpResponse(BaseResponse):
user_pool_id, limit=limit, pagination_token=token
)
if filt:
name, value = filt.replace('"', "").split("=")
name, value = filt.replace('"', "").replace(" ", "").split("=")
users = [
user
for user in users

View File

@ -1085,6 +1085,13 @@ def test_list_users():
result["Users"].should.have.length_of(1)
result["Users"][0]["Username"].should.equal(username_bis)
# checking Filter with space
result = conn.list_users(
UserPoolId=user_pool_id, Filter='phone_number = "+33666666666'
)
result["Users"].should.have.length_of(1)
result["Users"][0]["Username"].should.equal(username_bis)
@mock_cognitoidp
def test_list_users_returns_limit_items():