def test_should_raise_exception_when_delete_nonindexed_document(self): with self.assertRaises(NotFoundError): self.es.delete(index=self.index_name, doc_type=self.doc_type, id=1)