From 167d4afde82867614a4c7c8628a9d2a08a89d7ef Mon Sep 17 00:00:00 2001 From: Giovanni Grano Date: Tue, 5 Dec 2023 21:56:07 +0100 Subject: [PATCH] Route53: add CallerReference to the response of two more operations (#7097) --- moto/route53/responses.py | 3 +++ tests/test_route53/test_route53.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/moto/route53/responses.py b/moto/route53/responses.py index 3b2bdafed042..7227f85f59d1 100644 --- a/moto/route53/responses.py +++ b/moto/route53/responses.py @@ -660,6 +660,7 @@ def reusable_delegation_set(self, request: Any, full_url: str, headers: Any) -> /hostedzone/{{ zone.id }} {{ zone.name }} + {{ zone.caller_reference }} {{ zone.rrsets|count }} {% if zone.comment %} @@ -689,6 +690,7 @@ def reusable_delegation_set(self, request: Any, full_url: str, headers: Any) -> /hostedzone/{{ zone.id }} {{ zone.name }} + {{ zone.caller_reference }} {% if zone.comment %} {{ zone.comment }} @@ -711,6 +713,7 @@ def reusable_delegation_set(self, request: Any, full_url: str, headers: Any) -> /hostedzone/{{ zone.id }} {{ zone.name }} + {{ zone.caller_reference }} {% if zone.comment %} {{ zone.comment }} diff --git a/tests/test_route53/test_route53.py b/tests/test_route53/test_route53.py index a284408eee0f..1d5fd81a2cb6 100644 --- a/tests/test_route53/test_route53.py +++ b/tests/test_route53/test_route53.py @@ -594,9 +594,13 @@ def test_list_hosted_zones_by_dns_name(): zones = conn.list_hosted_zones_by_name() assert len(zones["HostedZones"]) == 4 assert zones["HostedZones"][0]["Name"] == "test.b.com." + assert zones["HostedZones"][0]["CallerReference"] == str(hash("foo")) assert zones["HostedZones"][1]["Name"] == "my.test.net." + assert zones["HostedZones"][1]["CallerReference"] == str(hash("baz")) assert zones["HostedZones"][2]["Name"] == "test.a.org." + assert zones["HostedZones"][2]["CallerReference"] == str(hash("bar")) assert zones["HostedZones"][3]["Name"] == "test.a.org." + assert zones["HostedZones"][3]["CallerReference"] == str(hash("bar")) @mock_route53