def test_that_when_putting_website_succeeds_the_put_website_method_returns_true(self): ''' tests True bucket updated. ''' result = boto_s3_bucket.put_website(Bucket='mybucket', **conn_parameters) self.assertTrue(result['updated'])
def test_that_when_putting_website_succeeds_the_put_website_method_returns_true( self, ): """ tests True bucket updated. """ result = boto_s3_bucket.put_website(Bucket="mybucket", **conn_parameters) self.assertTrue(result["updated"])
def test_that_when_putting_website_succeeds_the_put_website_method_returns_true( boto_conn): ''' tests True bucket updated. ''' result = boto_s3_bucket.put_website(Bucket='mybucket', **pytest.conn_parameters) assert result['updated'] is True
def test_that_when_putting_website_fails_the_put_website_method_returns_error(self): ''' tests False bucket not updated. ''' self.conn.put_bucket_website.side_effect = ClientError(error_content, 'put_bucket_website') result = boto_s3_bucket.put_website(Bucket='mybucket', **conn_parameters) self.assertEqual(result.get('error', {}).get('message'), error_message.format('put_bucket_website'))
def test_that_when_putting_website_fails_the_put_website_method_returns_error( boto_conn): ''' tests False bucket not updated. ''' boto_conn.put_bucket_website.side_effect = exceptions.ClientError( error_content, 'put_bucket_website') result = boto_s3_bucket.put_website(Bucket='mybucket', **pytest.conn_parameters) assert result.get( 'error', {}).get('message') == error_message.format('put_bucket_website')
def test_that_when_putting_website_fails_the_put_website_method_returns_error( self): """ tests False bucket not updated. """ self.conn.put_bucket_website.side_effect = ClientError( error_content, "put_bucket_website") result = boto_s3_bucket.put_website(Bucket="mybucket", **conn_parameters) assert result.get( "error", {}).get("message") == error_message.format("put_bucket_website")