Merge pull request #1859 from georgealton/master
Fixes #1857 Ensures a UserPool Id starts like {region}_
This commit is contained in:
commit
cb5bf5051b
@ -24,7 +24,7 @@ class CognitoIdpUserPool(BaseModel):
|
||||
|
||||
def __init__(self, region, name, extended_config):
|
||||
self.region = region
|
||||
self.id = str(uuid.uuid4())
|
||||
self.id = "{}_{}".format(self.region, str(uuid.uuid4().hex))
|
||||
self.name = name
|
||||
self.status = None
|
||||
self.extended_config = extended_config or {}
|
||||
|
@ -24,6 +24,7 @@ def test_create_user_pool():
|
||||
)
|
||||
|
||||
result["UserPool"]["Id"].should_not.be.none
|
||||
result["UserPool"]["Id"].should.match(r'[\w-]+_[0-9a-zA-Z]+')
|
||||
result["UserPool"]["Name"].should.equal(name)
|
||||
result["UserPool"]["LambdaConfig"]["PreSignUp"].should.equal(value)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user