From ed066582714d071e2db78ac96f3bd014a8b28a4a Mon Sep 17 00:00:00 2001 From: captainkerk Date: Sun, 28 Jan 2018 03:28:49 +0000 Subject: [PATCH] address spacing issues --- moto/redshift/exceptions.py | 2 ++ moto/redshift/models.py | 1 - moto/redshift/responses.py | 2 +- tests/test_redshift/test_redshift.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/moto/redshift/exceptions.py b/moto/redshift/exceptions.py index 138afd44..865aaeab 100644 --- a/moto/redshift/exceptions.py +++ b/moto/redshift/exceptions.py @@ -101,12 +101,14 @@ class SnapshotCopyDisabledFaultError(RedshiftClientError): 'SnapshotCopyDisabledFault', "Cannot modify retention period because snapshot copy is disabled on Cluster {0}.".format(cluster_identifier)) + class SnapshotCopyAlreadyDisabledFaultError(RedshiftClientError): def __init__(self, cluster_identifier): super(SnapshotCopyAlreadyDisabledFaultError, self).__init__( 'SnapshotCopyAlreadyDisabledFault', "Snapshot Copy is already disabled on Cluster {0}.".format(cluster_identifier)) + class SnapshotCopyAlreadyEnabledFaultError(RedshiftClientError): def __init__(self, cluster_identifier): super(SnapshotCopyAlreadyEnabledFaultError, self).__init__( diff --git a/moto/redshift/models.py b/moto/redshift/models.py index 4975868d..44e944c3 100644 --- a/moto/redshift/models.py +++ b/moto/redshift/models.py @@ -226,7 +226,6 @@ class Cluster(TaggableResourceMixin, BaseModel): "NodeType": self.node_type, "ClusterIdentifier": self.cluster_identifier, "AllowVersionUpgrade": self.allow_version_upgrade, - "Endpoint": { "Address": self.endpoint, "Port": self.port diff --git a/moto/redshift/responses.py b/moto/redshift/responses.py index bd7223c8..724a61b6 100644 --- a/moto/redshift/responses.py +++ b/moto/redshift/responses.py @@ -555,4 +555,4 @@ class RedshiftResponse(BaseResponse): "RequestId": "384ac68d-3775-11df-8963-01868b7c937a", } } - }) + }) diff --git a/tests/test_redshift/test_redshift.py b/tests/test_redshift/test_redshift.py index 46400d34..79da9f19 100644 --- a/tests/test_redshift/test_redshift.py +++ b/tests/test_redshift/test_redshift.py @@ -1090,6 +1090,7 @@ def test_disable_snapshot_copy(): response = client.describe_clusters(ClusterIdentifier='test') response['Clusters'][0].shouldnt.contain('ClusterSnapshotCopyStatus') + @mock_redshift def test_modify_snapshot_copy_retention_period(): client = boto3.client('redshift', region_name='us-east-1')