@@ -0,0 +1,936 @@
+#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A%22%22%22%0AUnit tests for pyes.  These require an es server with thrift plugin running on the default port (localhost:9500).%0A%22%22%22%0Aimport unittest%0Afrom pyes.tests import ESTestCase%0Aimport pyes.exceptions%0A%0Aclass ErrorReportingTestCase(ESTestCase):%0A    def setUp(self):%0A        super(ErrorReportingTestCase, self).setUp()%0A%0A    def testCreateDelete(self):%0A        %22%22%22%0A%0A        Test errors thrown when creating or deleting.%0A%0A        %22%22%22%0A        try:%0A            self.conn.delete_index(%22test-index%22)%0A        except pyes.exceptions.NotFoundException:%0A            pass%0A        self.conn.create_index(%22test-index%22)%0A        self.assertRaises(pyes.exceptions.AlreadyExistsException, self.conn.create_index, %22test-index%22)%0A        self.conn.delete_index(%22test-index%22)%0A        self.assertRaises(pyes.exceptions.NotFoundException, self.conn.delete_index, %22test-index%22)%0A%0Aif __name__ == %22__main__%22:%0A    unittest.main()%0A

Add test of the AlreadyExistsException and the NotFoundException, when creating or deleting databases