From 2bf85fe25dbf7190f9129df3497d07c972c482a8 Mon Sep 17 00:00:00 2001 From: Akhter Ali Date: Wed, 18 Jan 2017 21:40:04 -0500 Subject: [PATCH] Fix Route53 response and tests (#804) * Fix route53 response \n Fix route53 tests * Fixing index * fix zone ID on test_route53_with_update --- moto/route53/responses.py | 11 +++++++++-- .../test_cloudformation_stack_integration.py | 11 +++++++++++ tests/test_route53/test_route53.py | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/moto/route53/responses.py b/moto/route53/responses.py index 0e171a52c..429317dae 100644 --- a/moto/route53/responses.py +++ b/moto/route53/responses.py @@ -21,8 +21,15 @@ def list_or_create_hostzone_response(request, full_url, headers): else: comment = None private_zone = False + + + name = elements["CreateHostedZoneRequest"]["Name"] + + if name[-1] != ".": + name += "." + new_zone = route53_backend.create_hosted_zone( - elements["CreateHostedZoneRequest"]["Name"], + name, comment=comment, private_zone=private_zone, ) @@ -247,7 +254,7 @@ LIST_HOSTED_ZONES_RESPONSE = """