This commit is contained in:
		
							parent
							
								
									0b647fdb8b
								
							
						
					
					
						commit
						a192a42e8f
					
				| @ -384,7 +384,7 @@ class CognitoIdpBackend(BaseBackend): | ||||
|     def describe_user_pool(self, user_pool_id): | ||||
|         user_pool = self.user_pools.get(user_pool_id) | ||||
|         if not user_pool: | ||||
|             raise ResourceNotFoundError(user_pool_id) | ||||
|             raise ResourceNotFoundError(f"User pool {user_pool_id} does not exist.") | ||||
| 
 | ||||
|         return user_pool | ||||
| 
 | ||||
|  | ||||
| @ -215,6 +215,19 @@ def test_describe_user_pool(): | ||||
|     result["UserPool"]["LambdaConfig"]["PreSignUp"].should.equal(value) | ||||
| 
 | ||||
| 
 | ||||
| @mock_cognitoidp | ||||
| def test_describe_user_pool_resource_not_found(): | ||||
|     conn = boto3.client("cognito-idp", "us-east-1") | ||||
| 
 | ||||
|     user_pool_id = "us-east-1_FooBar123" | ||||
|     with pytest.raises(ClientError) as exc: | ||||
|         conn.describe_user_pool(UserPoolId=user_pool_id) | ||||
| 
 | ||||
|     err = exc.value.response["Error"] | ||||
|     err["Code"].should.equal("ResourceNotFoundException") | ||||
|     err["Message"].should.equal(f"User pool {user_pool_id} does not exist.") | ||||
| 
 | ||||
| 
 | ||||
| @mock_cognitoidp | ||||
| def test_update_user_pool(): | ||||
|     conn = boto3.client("cognito-idp", "us-east-1") | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user