{ "info": { "author": "Collins GmbH & Co. KG", "author_email": "mdomke@me.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Database", "Topic :: Software Development :: Libraries" ], "description": ".. image:: https://img.shields.io/pypi/v/humongous.svg\n :target: https://pypi.python.org/pypi/humongous\n.. image:: https://travis-ci.org/mdomke/humongous.svg?branch=master\n :target: https://travis-ci.org/mdomke/humongous\n.. image:: https://img.shields.io/pypi/l/humongous.svg\n :target: https://pypi.python.org/pypi/humongous\n\nWhat is this?\n=============\n\nThis is a pytest plugin, that enables you to test your code that relies on a\ndatabase connection to a MongoDB and expectes certain data to be present.\nIt allows you to specify fixtures for database collections in JSON/BSON or YAML\nformat. Under the hood we use the mongomock_ library, that you should\nconsult for documentation on how to use MongoDB mock objects. If suitable you\ncan also use a real MongoDb server.\n\n\nConfiguration\n-------------\n\nIf you don't want to put your fixtures on the top-level directory of your package\nyou have to specify a directory where `humongous` looks for your data definitions.\n\nTo do so put a line like the following under the ``pytest`` section of your\n`pytest.ini`-file put a\n\n.. code-block:: ini\n\n [pytest]\n humongous_basedir =\n tests/unit/fixtures\n\n`humongous` would then look for files ending in ``.yaml`` or ``.json`` in that\ndirectory.\n\nYou can also choose to use a real MongoDB server for your tests. In that case\nyou might also want to configure the hostname and/or the credentials if you\ndon't want to stick with the default (localhost and no credentials). Use the\nfollowing configuration values in your `pytest.ini` to adapt the settings to\nyour needs:\n\n.. code-block:: ini\n\n [pytest]\n humongous_engine = pymongo\n humongous_host = mongodb://user:passwd@server.tld\n humongous_dbname = mydbname\n\n\nBasic usage\n-----------\n\nAfter you configured `humongous` so that it can find your fixtures you're ready to\nspecify some data. Regardless of the markup language you choose, the data is provided\nas a list of documents (dicts). The collection that these documents are being inserted\ninto is given by the filename of your fixutre-file. E.g.: If you had a file named\n``players.yaml`` with the following content:\n\n.. code-block:: yaml\n\n -\n name: Mario\n surname: G\u00f6tze\n position: striker\n\n -\n name: Manuel\n surname: Neuer\n position: keeper\n\n\nyou'd end up with a collection `players` that has the above player definitions\ninserted. If your fixture file is in JSON/BSON format you can also use BSON specific\ntypes like `$oid`, `$date`, etc.\n\n\nYou get ahold of the database in you test-function by using the ``humongous`` fixture\nlike so:\n\n.. code-block:: python\n\n def test_players(humongous):\n assert \"players\" in humongous.collection_names()\n manuel = humongous.players.find_one({\"name\": \"Manuel\"})\n assert manuel[\"surname\"] == \"Neuer\"\n\n\nFor further information refer to the mongomock_ documentation.\n\n\n\n.. _mongomock: https://github.com/vmalloc/mongomock", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mdomke/humongous", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "humongous", "package_url": "https://pypi.org/project/humongous/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/humongous/", "project_urls": { "Homepage": "https://github.com/mdomke/humongous" }, "release_url": "https://pypi.org/project/humongous/1.3.0/", "requires_dist": [ "mongomock (>=2.3,<3.0.0)", "pymongo", "pytest (>=2.5.2)", "pyyaml" ], "requires_python": "", "summary": "Mongo database mocking with fixtures", "version": "1.3.0" }, "last_serial": 1771935, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "0706626c28ff3895a12a22d23f8d6b22", "sha256": "329beed20f3eb9698510f8b7f333cacaaa46989a4247722df76903c014b4567e" }, "downloads": -1, "filename": "humongous-1.0.3.tar.gz", "has_sig": false, "md5_digest": "0706626c28ff3895a12a22d23f8d6b22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5108, "upload_time": "2015-06-09T13:52:19", "url": "https://files.pythonhosted.org/packages/9a/70/744c55818e3f20565f7d0a41372d0732775c0d091c9fe19fc3f1821b63b9/humongous-1.0.3.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "26115ee8b90e7dc2f8df0fad901e6840", "sha256": "2faab0824e9cd0233d15003b865fe55debf695b74ae71f70d2cdf2128534befe" }, "downloads": -1, "filename": "humongous-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "26115ee8b90e7dc2f8df0fad901e6840", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5655, "upload_time": "2015-06-09T15:42:15", "url": "https://files.pythonhosted.org/packages/13/ca/d4b01f172a577e20766c2c35d8e3880a1bdd63ac2c9b0236ab39415260f8/humongous-1.0.5-py2.py3-none-any.whl" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "974e8b7f20a41aa13f8532491a0041dd", "sha256": "65d095cea0b1fa4c206a45f414e035a0448dff7415139fe8a87c8ee00f9052ee" }, "downloads": -1, "filename": "humongous-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "974e8b7f20a41aa13f8532491a0041dd", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5751, "upload_time": "2015-07-26T08:41:50", "url": "https://files.pythonhosted.org/packages/a1/20/b706aac5ace9a9c30f7fe1b7920cd275d013b7f9f9de636ddb56c62c1d6f/humongous-1.1.0-py2.py3-none-any.whl" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "5b1e6c76b302833f1812db3ccaadc58e", "sha256": "4c082b3321507b09e327cba3f150fed32574e9b49deda5624f4a06b9b4d1e20d" }, "downloads": -1, "filename": "humongous-1.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5b1e6c76b302833f1812db3ccaadc58e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6484, "upload_time": "2015-08-18T09:25:35", "url": "https://files.pythonhosted.org/packages/03/7d/ab854c353016bd53af152e0365599603ca3b27c96b4a775b65567631a556/humongous-1.2.2-py2.py3-none-any.whl" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "1d734e14ed2666991a9121a73fa58498", "sha256": "80872681ec3ac57cfb7f1ea82417a979c56513d0db7bc4bb86948820f7ad2909" }, "downloads": -1, "filename": "humongous-1.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1d734e14ed2666991a9121a73fa58498", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6482, "upload_time": "2015-08-18T14:13:13", "url": "https://files.pythonhosted.org/packages/60/0b/cf527345c45972e1c2b4b12553691b2c7fe29153b0ce10d970573ea39a5e/humongous-1.2.3-py2.py3-none-any.whl" } ], "1.2.4": [ { "comment_text": "", "digests": { "md5": "b8ff444f3519b835a31659d287a343bc", "sha256": "09b4c9aceeb29ce6078e022eb86f4403574af986dfaf8a68278365322f612ceb" }, "downloads": -1, "filename": "humongous-1.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b8ff444f3519b835a31659d287a343bc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6502, "upload_time": "2015-09-02T16:04:05", "url": "https://files.pythonhosted.org/packages/f4/31/9a287a420538978884fd6a92a4f5c61810d2c70973a2e84692ab1f9d9dc8/humongous-1.2.4-py2.py3-none-any.whl" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "55fc8a671237a17a2a7bf6d18c2d16c9", "sha256": "7c1b3fc6dbfe7d10a21d9cb1f55f0f1e2d40d30370ac4c024c64cd4bf31fb127" }, "downloads": -1, "filename": "humongous-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "55fc8a671237a17a2a7bf6d18c2d16c9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6565, "upload_time": "2015-10-16T15:36:23", "url": "https://files.pythonhosted.org/packages/ee/7c/0f5abc7027b3a02a0358baccfb7b0b59cf5602a9c5d15a9be296e11c93a0/humongous-1.3.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "55fc8a671237a17a2a7bf6d18c2d16c9", "sha256": "7c1b3fc6dbfe7d10a21d9cb1f55f0f1e2d40d30370ac4c024c64cd4bf31fb127" }, "downloads": -1, "filename": "humongous-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "55fc8a671237a17a2a7bf6d18c2d16c9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6565, "upload_time": "2015-10-16T15:36:23", "url": "https://files.pythonhosted.org/packages/ee/7c/0f5abc7027b3a02a0358baccfb7b0b59cf5602a9c5d15a9be296e11c93a0/humongous-1.3.0-py2.py3-none-any.whl" } ] }