{ "info": { "author": "Keith Bourgoin", "author_email": "keith at parsely dot com", "bugtrack_url": null, "classifiers": [], "description": "Make Integration Tests Easier\n=============================\n\ntestinstances is a set of managed instance wrappers to make integration testing with redis and mongodb easier. If you\nhave the binaries on your path, it can handle creating and destroying sandboxed instances for you to test with.\n\nExamples\n--------\n\nThe API is straightforward and easily embedeed in setup/teardown functions. It also automatically returns a connection\nto the instance.:\n\n.. code-block:: python\n\n import unittest\n\n from testinstances import RedisInstance\n\n class TestSomeJunk(unittest.TestCase):\n def setUp(self):\n # Set up an instance on port 12345\n self.redis = RedisInstance(12345)\n\n def tearDown(self):\n self.redis.terminate()\n\n def test_stuff(self):\n self.redis.conn.set('foo', 'bar')\n self.assertEqual(self.redis.conn.get('foo'), 'bar')\n\nOr, if you wanted to be fancy and avoid the process creation/termination cost for every test case:\n\n.. code-block:: python\n\n import unittest\n\n from testinstances import MongoInstance\n\n class TestSomeJunk(unittest.TestCase):\n @classmethod\n def setUpClass(cls):\n # Set up an instance on port 12345\n cls.mongo = MongoInstance(12345)\n\n @classmethod\n def tearDownClass(cls):\n cls.mongo.terminate()\n\n def setUp(self):\n # All instance types implement ``flush``\n self.mongo.flush()\n\n def test_stuff(self):\n collection = self.mongo.conn['someDB']['someCollection']\n collection.insert({'foo': 'bar'})\n self.assertEqual(collection.find({'foo': 'bar'}).next()['foo'], 'bar')\n\nDeveloping\n----------\nTo run the tests you need to install all of the databases the tests run:\n\nFor Debian/Ubuntu:\n\n.. code-block:: bash\n\n $ sudo apt-get install redis-server mongodb-server\n\nFor OSX:\n\n.. code-block:: bash\n\n $ sudo brew install redis mongodb\n\nThen you just run ``tox``.\n\nRoadmap\n-------\n\n* New Instance Kinds\n\n * Kafka\n * Zookeeper\n\n* Documentation and ReadTheDocs\n\n* Travis-CI\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Parsely/testinstances", "keywords": null, "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "testinstances", "package_url": "https://pypi.org/project/testinstances/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/testinstances/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Parsely/testinstances" }, "release_url": "https://pypi.org/project/testinstances/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Managed test instances for integration tests", "version": "0.3.0" }, "last_serial": 1776728, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1a354ffad7d506e85f6b9c231a08a4b0", "sha256": "07d3061fb1aefacced3326b2c9020238cf4f85e589a46078b04de1da09579840" }, "downloads": -1, "filename": "testinstances-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1a354ffad7d506e85f6b9c231a08a4b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5098, "upload_time": "2013-06-17T20:38:46", "url": "https://files.pythonhosted.org/packages/0b/70/734d33a8b54b7e10f781460590881be8168809ca5732641bcc9c015dfc68/testinstances-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "fa3d75e3fa3c30435830cf38444624ad", "sha256": "9aed8ed902b61379fb6fe8ce46108b9c3f394c8c3e1820190a972f09857d5762" }, "downloads": -1, "filename": "testinstances-0.1.1.tar.gz", "has_sig": false, "md5_digest": "fa3d75e3fa3c30435830cf38444624ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5096, "upload_time": "2013-06-17T20:41:10", "url": "https://files.pythonhosted.org/packages/db/74/83ec6e33599e8fed2c89dc8a1930706058a9aa2a25c84802c893a2c39ed2/testinstances-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a59471bec489ece19b37f6741444be62", "sha256": "7c2046cb92926c7cd5b9d66931e0fb181cc6b3f5d9278bdf1a75291dd9a91550" }, "downloads": -1, "filename": "testinstances-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a59471bec489ece19b37f6741444be62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5354, "upload_time": "2014-06-30T02:21:55", "url": "https://files.pythonhosted.org/packages/3f/1b/a3327a41cabb8f7e4d7bd09d98506d869038391cfbe9a7f03595554e2bad/testinstances-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "537a2308f9db0cb2b2187afce058f9dd", "sha256": "512d4fb9663e445061037991ffc62bc4709e6468d934b35968545a6dd420871f" }, "downloads": -1, "filename": "testinstances-0.2.1.tar.gz", "has_sig": false, "md5_digest": "537a2308f9db0cb2b2187afce058f9dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5514, "upload_time": "2015-06-25T19:53:30", "url": "https://files.pythonhosted.org/packages/22/b1/85c52052dcf2c352134de3f7339c45063255fe4a0299c630225b10b63ebd/testinstances-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "4778336c04127bf885d6665f744f9758", "sha256": "410444037181e49727b1fb744d21263249b00393a146b2c7c1b9662c1f4f4a0c" }, "downloads": -1, "filename": "testinstances-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4778336c04127bf885d6665f744f9758", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6738, "upload_time": "2015-10-19T18:58:47", "url": "https://files.pythonhosted.org/packages/e7/17/a852428d67b045223598f559572c4c50d725de267f6f7ce3a94f986f0e6a/testinstances-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4778336c04127bf885d6665f744f9758", "sha256": "410444037181e49727b1fb744d21263249b00393a146b2c7c1b9662c1f4f4a0c" }, "downloads": -1, "filename": "testinstances-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4778336c04127bf885d6665f744f9758", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6738, "upload_time": "2015-10-19T18:58:47", "url": "https://files.pythonhosted.org/packages/e7/17/a852428d67b045223598f559572c4c50d725de267f6f7ce3a94f986f0e6a/testinstances-0.3.0.tar.gz" } ] }