コード例 #1
0
ファイル: boto_s3_bucket_test.py プロジェクト: bryson/salt
    def test_that_when_putting_replication_succeeds_the_put_replication_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_replication(Bucket='mybucket',
                                        Role='arn:aws:iam:::',
                                        Rules='[]',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
コード例 #2
0
ファイル: boto_s3_bucket_test.py プロジェクト: jiangf13/salt
    def test_that_when_putting_replication_succeeds_the_put_replication_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_replication(Bucket='mybucket',
                                        Role='arn:aws:iam:::',
                                        Rules='[]',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
コード例 #3
0
    def test_that_when_putting_replication_succeeds_the_put_replication_method_returns_true(
        self, ):
        """
        tests True bucket updated.
        """
        result = boto_s3_bucket.put_replication(Bucket="mybucket",
                                                Role="arn:aws:iam:::",
                                                Rules="[]",
                                                **conn_parameters)

        self.assertTrue(result["updated"])
コード例 #4
0
ファイル: boto_s3_bucket_test.py プロジェクト: bryson/salt
 def test_that_when_putting_replication_fails_the_put_replication_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_replication.side_effect = ClientError(error_content,
                    'put_bucket_replication')
     result = boto_s3_bucket.put_replication(Bucket='mybucket',
                                     Role='arn:aws:iam:::',
                                     Rules='[]',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_replication'))
コード例 #5
0
ファイル: boto_s3_bucket_test.py プロジェクト: jiangf13/salt
 def test_that_when_putting_replication_fails_the_put_replication_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_replication.side_effect = ClientError(error_content,
                    'put_bucket_replication')
     result = boto_s3_bucket.put_replication(Bucket='mybucket',
                                     Role='arn:aws:iam:::',
                                     Rules='[]',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_replication'))
コード例 #6
0
 def test_that_when_putting_replication_fails_the_put_replication_method_returns_error(
     self, ):
     """
     tests False bucket not updated.
     """
     self.conn.put_bucket_replication.side_effect = ClientError(
         error_content, "put_bucket_replication")
     result = boto_s3_bucket.put_replication(Bucket="mybucket",
                                             Role="arn:aws:iam:::",
                                             Rules="[]",
                                             **conn_parameters)
     assert result.get("error", {}).get("message") == error_message.format(
         "put_bucket_replication")