diff --git a/moto/pinpoint/models.py b/moto/pinpoint/models.py index 69053ce476dd..a482a783a7c1 100644 --- a/moto/pinpoint/models.py +++ b/moto/pinpoint/models.py @@ -14,7 +14,7 @@ class App(BaseModel): def __init__(self, account_id: str, region_name: str, name: str): self.application_id = str(mock_random.uuid4()).replace("-", "") - self.arn = f"arn:{get_partition(region_name)}:mobiletargeting:us-east-1:{account_id}:apps/{self.application_id}" + self.arn = f"arn:{get_partition(region_name)}:mobiletargeting:{region_name}:{account_id}:apps/{self.application_id}" self.name = name self.created = unix_time() self.settings = AppSettings() diff --git a/tests/test_pinpoint/test_pinpoint.py b/tests/test_pinpoint/test_pinpoint.py index bdf4cc042e8d..adea2e753b29 100644 --- a/tests/test_pinpoint/test_pinpoint.py +++ b/tests/test_pinpoint/test_pinpoint.py @@ -17,6 +17,7 @@ def test_create_app(): assert "ApplicationResponse" in resp assert "Arn" in resp["ApplicationResponse"] + assert "us-east-1" in resp["ApplicationResponse"]["Arn"] assert "Id" in resp["ApplicationResponse"] assert resp["ApplicationResponse"]["Name"] == "myfirstapp" assert "CreationDate" in resp["ApplicationResponse"] @@ -50,6 +51,7 @@ def test_get_app(): assert "ApplicationResponse" in resp assert "Arn" in resp["ApplicationResponse"] + assert "eu-west-1" in resp["ApplicationResponse"]["Arn"] assert "Id" in resp["ApplicationResponse"] assert resp["ApplicationResponse"]["Name"] == "myfirstapp" assert "CreationDate" in resp["ApplicationResponse"]