{ "info": { "author": "Roger Ineichen, Projekt01 GmbH", "author_email": "dev@projekt01.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Zope3", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "This package provides a mongodb server stub setup for python doctests.\n\n\n======\nREADME\n======\n\nThis package provides a mongo database server testing stub. You can simply\nsetup such a mongodb stub server in a doctest like::\n\n import doctest\n import unittest\n\n from m01.stub import testing\n\n def test_suite():\n return unittest.TestSuite((\n doctest.DocFileSuite('README.txt',\n setUp=testing.doctestSetUp,\n tearDown=testing.doctestTearDown,\n optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),\n ))\n\n\n if __name__ == '__main__':\n unittest.main(defaultTest='test_suite')\n\nThe m01/stub/testing.py module provides a start and stop method which will\ndownload, install, start and stop a mongodb server. All this is done in the\nm01/stub/testing/sandbox folder. Everytime a test get started the mongodb/data\nfolder get removed and a fresh empty database get used.\n\nNote: Also see the zipFolder and unZipFile methods in testing.py which allows\nyou to setup mongodb data and before remove them store them as a zip file\nfor a next test run. Such a zipped data folder can get used in another test run\nby set the path to the zip file as dataSource argument. Also check the\nm01.mongo package for more test use cases.\n\n\nTesting\n-------\n\nLet's use the pymongo package for test our mongodb server stub setup. Note we\nuse a different port for our stub server setup (45017 instead of 27017):\n\n >>> from pprint import pprint\n >>> import pymongo\n >>> from pymongo.periodic_executor import _shutdown_executors\n >>> conn = pymongo.MongoClient('mongodb://127.0.0.1:45017')\n\nLet's test our mongodb stub setup:\n\n >>> pprint(conn.server_info())\n {...,\n u'ok': 1.0,\n ...}\n\n\n >>> conn.database_names()\n [u'admin', u'local']\n\nsetup an index:\n\n >>> conn.testing.test.collection.ensure_index('dummy')\n u'dummy_1'\n\nadd an object:\n\n >>> _id = conn.testing.test.save({'__name__': u'foo', 'dummy': u'object'})\n >>> _id\n ObjectId('...')\n\nremove them:\n\n >>> conn.testing.test.remove({'_id': _id})\n {...}\n\nand check the database names again:\n\n >>> conn.database_names()\n [u'admin', u'local', u'testing']\n\nLet's drop the database:\n\n >>> conn.drop_database(\"testing\")\n >>> conn.database_names()\n [u'admin', u'local']\n\n\nClose client:\n\n >>> conn.close()\n >>> _shutdown_executors()\n\n\n=======\nCHANGES\n=======\n\n3.1.0 (2018-01-29)\n------------------\n\n- bugfix: support different download urls for windows. Not every option is\n released. We will try different urls for windows 64 bit versions.\n Note, you will probably run into a MemoryError during download if your try\n to download a large mongodb release with a non 64 bit python version.\n\n\n3.0.1 (2015-11-10)\n------------------\n\n- support pymongo >= 3.0.0 and use 3.0.0 as package version and reflect\n pymongo >= 3.0.0 compatibility\n\n\n3.0.0 (2015-09-28)\n------------------\n\n- pymongo > 3.0.0 compatibility. Support pymongo > 3.0.0 use MongoClient instead\n of Connection etc. Use 3.0.0 as package version and reflect pymongo > 3.0.0\n compatibility.\n\n- switch default mongodb download version to 3.0.6\n\n- improve shutdown mongodb server, cleanup client weakref\n\n\n0.5.8 (2015-03-17)\n------------------\n\n- update default mongodb version to 2.4.10\n\n- changed default mongodb allocation space from 100MB to 10MB for faster server\n startup\n\n- bugfix: startup check didn't fit and it was forced 16 times to sleep for one\n second. Fix server status ok check from '1.0' to 1\n\n\n0.5.7 (2012-12-10)\n------------------\n\n- bugfix: didn't shutdown with sleep lower the 1\n\n- improve server setup, use unique log files for each startup\n\n- run tests with pymongo 2.4.1\n\n\n0.5.6 (2012-12-09)\n------------------\n\n- switch to mongodb 2.2.2 and support version property in startMongoServer\n\n\n0.5.5 (2012-11-18)\n------------------\n\n- bugfix: fix start and stop observer methods. Replaced javascript calls with\n simpler pymongo connectionn calls for startup check and shutdown\n\n\n0.5.4 (2012-11-18)\n------------------\n\n- update to mongodb 2.2.0\n\n- switch to bson import\n\n- force 64 bit download by default\n\n- use \"sleep\" value only for files and directories, use flexible wait for\n process\n\n- bugfix: mongo results comes back with a line break\n\n- bugfix: string cmd *only* on Windows\n\n- use shell=False to start mongodb, even on posix (safer). This changes the\n \"options\" argument: it has to be a list now\n\n- to stop mongodb, we are now sending a command through the \"mongo shell\",\n we do not use a pid file any more, all we need is the port, which we keep\n in a global\n\n- we are now repeatedly checking till the mongodb server starts up and\n answers to an admin query\n\n- move flexible sub-version tests to accomodate OpenBSD\n\n- fixed detection of being on a Mac for mongo db download for tests\n\n- added MANIFEST.in file\n\n\n0.5.3 (2011-08-26)\n------------------\n\n- Fix 32bit linux download (Albertas)\n- Remove temp files after download\n- Fix 64bit linux\n\n\n0.5.2 (2011-08-24)\n------------------\n\n- Still fixing on linux\n\n\n0.5.1 (2011-08-24)\n------------------\n\n- fix on linux\n\n\n0.5.0 (2011-08-19)\n------------------\n\n- initial release tested on win 32bit. NOT tested on win 64bit, mac 32/64bit\n and posix 32/64bit systems. Please report if something doesn't work on this\n systems.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/m01.stub", "keywords": "Zope3 z3c p01 m01 mongodb server stub setup", "license": "ZPL 2.1", "maintainer": "", "maintainer_email": "", "name": "m01.stub", "package_url": "https://pypi.org/project/m01.stub/", "platform": "", "project_url": "https://pypi.org/project/m01.stub/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/m01.stub" }, "release_url": "https://pypi.org/project/m01.stub/3.1.0/", "requires_dist": null, "requires_python": "", "summary": "MongoDB server stub setup", "version": "3.1.0" }, "last_serial": 3530212, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "84860dd7a6c441539a4a3dc65feefeed", "sha256": "8653a8cfc32179fc43c22e7bbc7a94577230dfcea6c46441b64cf190b2d3b489" }, "downloads": -1, "filename": "m01.stub-0.5.0.zip", "has_sig": false, "md5_digest": "84860dd7a6c441539a4a3dc65feefeed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15860, "upload_time": "2011-08-19T02:18:36", "url": "https://files.pythonhosted.org/packages/fa/df/98079d8a638b7b65df01b33e79e6b2f5e7a0f4de3016d28107210ef9c524/m01.stub-0.5.0.zip" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "dc101947997480fe3b3846a2bbdabe50", "sha256": "a0ed151cf984b650a0012b4117e40694b2f8628b96b2c363653ac8deec8ad89d" }, "downloads": -1, "filename": "m01.stub-0.5.1.tar.gz", "has_sig": false, "md5_digest": "dc101947997480fe3b3846a2bbdabe50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8448, "upload_time": "2011-08-24T16:42:46", "url": "https://files.pythonhosted.org/packages/6f/b7/4639d0c22cdbb35b157edeff6db47692e31a7d6750c29430a7980e6a27ff/m01.stub-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "9786348542e3cc96900063e180931cb1", "sha256": "d7668a9c77aa4f71438738d29077a93b658a09f7223ffa55a3e669078acafb2c" }, "downloads": -1, "filename": "m01.stub-0.5.2.tar.gz", "has_sig": false, "md5_digest": "9786348542e3cc96900063e180931cb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8454, "upload_time": "2011-08-24T18:02:24", "url": "https://files.pythonhosted.org/packages/eb/67/b38547e04766559a824c7237325c5e3e2df9d6184b71d46e4c80204f80f6/m01.stub-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "7fc6d476030bf855eedff45dd7670b39", "sha256": "5c88394adcd7f5f6e1fdbfca2df3cadc682fd9afef7f2d92adf7444b4c087068" }, "downloads": -1, "filename": "m01.stub-0.5.3.tar.gz", "has_sig": false, "md5_digest": "7fc6d476030bf855eedff45dd7670b39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8561, "upload_time": "2011-08-26T11:30:51", "url": "https://files.pythonhosted.org/packages/79/41/e83401aa8e4ada9e4b7b1c1ad3086b3e8d121b83898914aa67726899be49/m01.stub-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "fb35dec4651efc9feebe6d5f45ced60b", "sha256": "fa4525041e6e44955ff7a607251368e259d553084388eb88c4cfb1456cb0b4b5" }, "downloads": -1, "filename": "m01.stub-0.5.4.zip", "has_sig": false, "md5_digest": "fb35dec4651efc9feebe6d5f45ced60b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18329, "upload_time": "2012-11-18T14:14:41", "url": "https://files.pythonhosted.org/packages/b5/d8/86df05277ea2ff3833293096d123e91a6806d46f7b4fb023ee221251ae0a/m01.stub-0.5.4.zip" } ], "0.5.5": [ { "comment_text": "", "digests": { "md5": "165db190045149947731ae7492a746d0", "sha256": "c353e4857a7279eb9cd52421c532f3851a0439f6c98e5aa3d3143eab4184e903" }, "downloads": -1, "filename": "m01.stub-0.5.5.zip", "has_sig": false, "md5_digest": "165db190045149947731ae7492a746d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18420, "upload_time": "2012-11-18T16:52:24", "url": "https://files.pythonhosted.org/packages/35/e5/df11d0fc64353e3404577ca10a11cd9a47bdad0f301636bfe90ee0b342a4/m01.stub-0.5.5.zip" } ], "0.5.6": [ { "comment_text": "", "digests": { "md5": "0459d9327b34f5cf0164e8060c272725", "sha256": "9b51d5bed2d0b45e76b47d7914fc218c4bfc7d9d8535741c1575ce897e18fb89" }, "downloads": -1, "filename": "m01.stub-0.5.6.zip", "has_sig": false, "md5_digest": "0459d9327b34f5cf0164e8060c272725", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18558, "upload_time": "2012-12-09T05:18:13", "url": "https://files.pythonhosted.org/packages/1d/7a/2cde54924319251e46cd3a12cfded44affcaac19cbb597603b6bbc744575/m01.stub-0.5.6.zip" } ], "0.5.7": [ { "comment_text": "", "digests": { "md5": "74f0e060d3643bb7d991e5fc56987d5b", "sha256": "838ac9695ad0f270d5412c17b4eb029e7340ab445d3174daacdd11edb3fb16c5" }, "downloads": -1, "filename": "m01.stub-0.5.7.zip", "has_sig": false, "md5_digest": "74f0e060d3643bb7d991e5fc56987d5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19328, "upload_time": "2012-12-10T01:28:01", "url": "https://files.pythonhosted.org/packages/c6/8e/21f325b8ca391f9d15513e14b21d44a33acc90b682b0d3fc955871feb1ee/m01.stub-0.5.7.zip" } ], "0.5.8": [ { "comment_text": "", "digests": { "md5": "22447e9a5e8825df25606a853ccd8a75", "sha256": "7e8f254c1cbc4a9042c8707021bf04145e5a585ba0ac5b58b718e1f9fa8cd807" }, "downloads": -1, "filename": "m01.stub-0.5.8.zip", "has_sig": false, "md5_digest": "22447e9a5e8825df25606a853ccd8a75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22436, "upload_time": "2015-03-17T12:29:18", "url": "https://files.pythonhosted.org/packages/ae/61/bbfaa1ea9e2227817615d7d062fdebe308d993c837128d99ef0484d7dc5c/m01.stub-0.5.8.zip" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "1186f1e936160bdaf4691d8218178ae0", "sha256": "07261b27336e649fe6a054392c68b31e02527a062717bb80afb9f9b34da67cee" }, "downloads": -1, "filename": "m01.stub-3.0.0.zip", "has_sig": false, "md5_digest": "1186f1e936160bdaf4691d8218178ae0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21696, "upload_time": "2015-09-28T00:47:24", "url": "https://files.pythonhosted.org/packages/d1/55/8c41beed527f2a46e29dbce251867c9bfa06a52d0bcec39bdc4e78c24ed0/m01.stub-3.0.0.zip" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "0b7f2aa9f2c4be0c6211d81e573602cb", "sha256": "87c19e4b7922b07c0ce2cd30ada02575edf93b09a0e80bc324eb4c457548ec18" }, "downloads": -1, "filename": "m01.stub-3.0.1.zip", "has_sig": false, "md5_digest": "0b7f2aa9f2c4be0c6211d81e573602cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21804, "upload_time": "2015-11-11T13:40:58", "url": "https://files.pythonhosted.org/packages/00/77/4af34ce15525fe15d6f5f141c6315947d30e08e70d65d7e8e1e38a9d783d/m01.stub-3.0.1.zip" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "bef97f7b8596314bf3c1223036a37904", "sha256": "a4745bc50de8306cd034482e22eeda82953b2c4182c2b8fcf10b79eebade6be1" }, "downloads": -1, "filename": "m01.stub-3.1.0.tar.gz", "has_sig": false, "md5_digest": "bef97f7b8596314bf3c1223036a37904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14759, "upload_time": "2018-01-29T02:10:33", "url": "https://files.pythonhosted.org/packages/a1/a7/59d11b2d98df667d966e057db346763e8e9178a5f35cd038e21846fc0db0/m01.stub-3.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bef97f7b8596314bf3c1223036a37904", "sha256": "a4745bc50de8306cd034482e22eeda82953b2c4182c2b8fcf10b79eebade6be1" }, "downloads": -1, "filename": "m01.stub-3.1.0.tar.gz", "has_sig": false, "md5_digest": "bef97f7b8596314bf3c1223036a37904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14759, "upload_time": "2018-01-29T02:10:33", "url": "https://files.pythonhosted.org/packages/a1/a7/59d11b2d98df667d966e057db346763e8e9178a5f35cd038e21846fc0db0/m01.stub-3.1.0.tar.gz" } ] }