{ "info": { "author": "Florian Plattner", "author_email": "me@florianplattner.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Other Environment", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "db_integration_test\n===================\n\nEasily setup relational database fixtures and assert database contents in unittest.\n\n\nInstall\n-------\n\n.. code-block:: bash\n\n $ pip install db_integration_test\n\n\nUsage\n-----\n\n.. code-block:: python\n\n from dbit import DatabaseTestCase, fixture\n\n class SomeTest(DatabaseTestCase):\n\n def setUp(self):\n # the DB connection has to be created before the setUp is run.\n # DatabaseTestCase only ever creates a single connection. Multiple calls to connect are ignored.\n # to connect to a different DB, call self.disconnect(), then self.connect() with a different connection string.\n # uses SQLAlchemy under the hood\n self.connect('postgresql+psycopg2://user:pass@localhost/test_db')\n super().setUp()\n\n @fixture(\"table_name\", [{'id': 1, 'value': 'abc'}, {'id': 2, 'value': 'def'}])\n def test_something_with_your_database(self):\n # interact with the DB\n # self.engine contains the SQLAlchemy Engine\n # self.session contains the SQLAlchemy ORM session\n # self.base contains the automap base for the current database\n # self.disconnect() disconnects from the DB\n\n # assert that the table contents match the fixture exactly\n self.assertMatchFixture(\"table_name\", self.get_table_contents(self.base.classes.table_name))\n\n # assert that some number of rows appear in the fixture\n self.assertAllInFixture(\"table_name\", [{'id': 1, 'value': 'abc'}])\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/flowpl/dbit", "keywords": "testing\nfixture\ntest data\ndatabase\nassertion\nintegration", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "db_integration_test", "package_url": "https://pypi.org/project/db_integration_test/", "platform": "", "project_url": "https://pypi.org/project/db_integration_test/", "project_urls": { "Homepage": "https://github.com/flowpl/dbit" }, "release_url": "https://pypi.org/project/db_integration_test/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "Easily setup relational database fixtures and assert database contents in unittest.", "version": "1.1.0" }, "last_serial": 3298520, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "e60194c06b4c3891af74f223aff94f4e", "sha256": "db90f127fd2eeb616271991d0b7c132177b73d713a546a0b24b27d51a67d32ee" }, "downloads": -1, "filename": "db_integration_test-1.1.0.tar.gz", "has_sig": false, "md5_digest": "e60194c06b4c3891af74f223aff94f4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5272, "upload_time": "2017-11-01T21:44:39", "url": "https://files.pythonhosted.org/packages/8f/41/0717d6c8770c47e7754be6b0e297e3c8e453251fda6e9ffcb8ed44c78efb/db_integration_test-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e60194c06b4c3891af74f223aff94f4e", "sha256": "db90f127fd2eeb616271991d0b7c132177b73d713a546a0b24b27d51a67d32ee" }, "downloads": -1, "filename": "db_integration_test-1.1.0.tar.gz", "has_sig": false, "md5_digest": "e60194c06b4c3891af74f223aff94f4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5272, "upload_time": "2017-11-01T21:44:39", "url": "https://files.pythonhosted.org/packages/8f/41/0717d6c8770c47e7754be6b0e297e3c8e453251fda6e9ffcb8ed44c78efb/db_integration_test-1.1.0.tar.gz" } ] }