From 2a950f0da207179621b0517838064dc8a1aed439 Mon Sep 17 00:00:00 2001 From: Mike Grima Date: Sat, 4 Jul 2020 12:36:14 -0700 Subject: [PATCH] Fixed circlular import with RDS and CF --- moto/rds/exceptions.py | 10 ++++++++++ moto/rds/models.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/moto/rds/exceptions.py b/moto/rds/exceptions.py index cf9b9aac6..6fe30878b 100644 --- a/moto/rds/exceptions.py +++ b/moto/rds/exceptions.py @@ -36,3 +36,13 @@ class DBSubnetGroupNotFoundError(RDSClientError): "DBSubnetGroupNotFound", "Subnet Group {0} not found.".format(subnet_group_name), ) + + +class UnformattedGetAttTemplateException(Exception): + """Duplicated from CloudFormation to prevent circular deps.""" + + description = ( + "Template error: resource {0} does not support attribute type {1} in Fn::GetAtt" + ) + + status_code = 400 diff --git a/moto/rds/models.py b/moto/rds/models.py index 421f3784b..40b1197b6 100644 --- a/moto/rds/models.py +++ b/moto/rds/models.py @@ -3,10 +3,10 @@ from __future__ import unicode_literals import boto.rds from jinja2 import Template -from moto.cloudformation.exceptions import UnformattedGetAttTemplateException from moto.core import BaseBackend, BaseModel from moto.core.utils import get_random_hex from moto.ec2.models import ec2_backends +from moto.rds.exceptions import UnformattedGetAttTemplateException from moto.rds2.models import rds2_backends