def test_that_when_updating_a_domain_fails_the_update_domain_method_returns_error(self): ''' tests False domain not updated. ''' self.conn.update_elasticsearch_domain_config.side_effect = ClientError(error_content, 'update_domain') args = copy.copy(domain_ret) args.update(conn_parameters) result = boto_elasticsearch_domain.update(**args) self.assertEqual(result.get('error', {}).get('message'), error_message.format('update_domain'))
def test_that_when_updating_a_domain_fails_the_update_domain_method_returns_error(self): ''' tests False domain not updated. ''' self.conn.update_elasticsearch_domain_config.side_effect = ClientError(error_content, 'update_domain') args = copy.copy(domain_ret) args.update(conn_parameters) result = boto_elasticsearch_domain.update(**args) self.assertEqual(result.get('error', {}).get('message'), error_message.format('update_domain'))
def test_that_when_updating_a_domain_succeeds_the_update_domain_method_returns_true(self): ''' tests True domain updated. ''' self.conn.update_elasticsearch_domain_config.return_value = {'DomainConfig': domain_ret} args = copy.copy(domain_ret) args.update(conn_parameters) result = boto_elasticsearch_domain.update(**args) self.assertTrue(result['updated'])
def test_that_when_updating_a_domain_succeeds_the_update_domain_method_returns_true(self): ''' tests True domain updated. ''' self.conn.update_elasticsearch_domain_config.return_value = {'DomainConfig': domain_ret} args = copy.copy(domain_ret) args.update(conn_parameters) result = boto_elasticsearch_domain.update(**args) self.assertTrue(result['updated'])
def test_that_when_updating_a_domain_fails_the_update_domain_method_returns_error( self, ): """ tests False domain not updated. """ self.conn.update_elasticsearch_domain_config.side_effect = ClientError( error_content, "update_domain") args = copy.copy(domain_ret) args.update(conn_parameters) result = boto_elasticsearch_domain.update(**args) assert result.get( "error", {}).get("message") == error_message.format("update_domain")
def test_that_when_updating_a_domain_succeeds_the_update_domain_method_returns_true( self, ): """ tests True domain updated. """ self.conn.update_elasticsearch_domain_config.return_value = { "DomainConfig": domain_ret } args = copy.copy(domain_ret) args.update(conn_parameters) result = boto_elasticsearch_domain.update(**args) assert result["updated"]