def test_delete_indices_negative(self): client = Mock() client.indices.delete.side_effect = fake_fail self.assertFalse(curator.delete_indices(client, named_indices))
def test_delete_indices_negative(self): client = Mock() client.info.return_value = {"version": {"number": "2.0.0"}} client.indices.delete.side_effect = fake_fail self.assertFalse(curator.delete_indices(client, named_indices))
def test_delete_indices_positive(self): client = Mock() client.indices.delete.return_value = None self.assertTrue(curator.delete_indices(client, named_indices))
def test_delete_indices_negative(self): client = Mock() client.info.return_value = {'version': {'number': '2.0.0'} } client.indices.delete.side_effect = fake_fail self.assertFalse(curator.delete_indices(client, named_indices))
def test_delete_indices_positive(self): client = Mock() client.info.return_value = {"version": {"number": "2.0.0"}} client.indices.delete.return_value = None self.assertTrue(curator.delete_indices(client, named_indices))
def test_delete_indices_positive(self): client = Mock() client.info.return_value = {'version': {'number': '2.0.0'} } client.indices.delete.return_value = None self.assertTrue(curator.delete_indices(client, named_indices))
def test_index_will_be_deleted(self): self.create_index('test_index') self.assertTrue(curator.delete_indices(self.client, 'test_index')) self.assertFalse(self.client.indices.exists('test_index'))