{ "info": { "author": "Rapha\u00ebl Barrois", "author_email": "raphael.barrois+shareddb@polytechnique.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "django-shareddb\n===============\n\nThis proxy database backend is designed to speed up multi-threaded testing setups.\n\nIt enables those setups (for instance using ``LiveServerTestCase``) to use Django's\nstandard ``TestCase`` - where each test runs in its own transaction -\ninstead of the much slower ``TransactionTestCase`` that needs to flush the whole\ndatabase between each tests.\n\n\nIt is **NOT** intended for production use, only for faster testing setups.\n\n\nThis project support Django versions 1.6, and Python 2.7, 3.2 and 3.3.\n\nSetup\n-----\n\nFirst, install django-shareddb:\n\n.. code-block:: shel\n\n $ pip install django-shareddb\n\n\nThen, simply update your settings to use its wrapping engine:\n\n.. code-block:: python\n\n DATABASES = {\n 'default': {\n 'ENGINE': 'shareddb.backends.shareddb',\n 'INNER_ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'test-dbsharing',\n }\n }\n\nSince altering those settings is very frequent, django-shareddb also provides\na simple ``patch_databases`` function:\n \n.. code-block:: python\n\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'test-dbsharing',\n }\n }\n\n if os.environ['FAST_TESTS']:\n import shareddb\n DATABASES = shareddb.patch_databases(DATABASES)\n \n.. note:: ``patch_databases`` accepts two keyword arguments,\n ``whitelist`` (only alter databases from that list) and\n ``blacklist`` (never alter databases from that list).\n\n The ``blacklist`` has priority over the ``whitelist``.\n\n\nOnce the settings are ready, simply replace your calls to Django's LiveServerTestCase with the django-shareddb variant:\n\n.. code-block:: python\n\n from shareddb import testcases\n\n class MyTests(testcases.LiveServerTestCase):\n def test_something(self):\n # Your test here\n\n\nThe django-shareddb ``LiveServerTestCase`` is simply a clone of Django's version,\nbut uses ``django.test.TestCase`` instead of ``django.test.TransactionTestCase``.\n\n\nLinks\n-----\n\n* The code of this project is available on GitHub: https://github.com/rbarrois/django-shareddb\n* It is available on PyPI: https://pypi.python.org/pypi/django-shareddb\n* Issues, questions, and new features should be opened on GitHub: https://github.com/rbarrois/django-shareddb/issues\n\n\nTesting\n-------\n\nThis libraries has been succesfully tested with sqlite and postgresql.\n\nIf you want to test it with other databases, please clone it and alter\n``dev/settings.py`` for your setup, then run ``./manage.py test``.", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/django-shareddb/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rbarrois/django-shareddb/", "keywords": "django,liveserver,shared connection", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-shareddb", "package_url": "https://pypi.org/project/django-shareddb/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-shareddb/", "project_urls": { "Download": "https://pypi.python.org/pypi/django-shareddb/", "Homepage": "https://github.com/rbarrois/django-shareddb/" }, "release_url": "https://pypi.org/project/django-shareddb/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Shared database connections for multi-threaded Django test setups.", "version": "0.1.2" }, "last_serial": 1110252, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "15d9472ef5f51d00cd23c86f18c90dcc", "sha256": "73c1eb27a4b8f9a02c70db047d2e33de977429fc4de818959be3f3dd302b4ba9" }, "downloads": -1, "filename": "django-shareddb-0.1.0.tar.gz", "has_sig": false, "md5_digest": "15d9472ef5f51d00cd23c86f18c90dcc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8382, "upload_time": "2014-05-06T14:42:19", "url": "https://files.pythonhosted.org/packages/39/c2/67acd9bc22ee58246c8cba39c64a9bd22c1f4ccf39bcde4c1f25b7a99233/django-shareddb-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a1c9c65ffa122593e5071e069c590a4b", "sha256": "08c43eb49efc96c4954a18e5e739aa8690f27c5d78054592397f54011038b591" }, "downloads": -1, "filename": "django-shareddb-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a1c9c65ffa122593e5071e069c590a4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8557, "upload_time": "2014-05-06T15:10:06", "url": "https://files.pythonhosted.org/packages/ad/15/20ad89b47ee34ae6b762c7dd54e3ed85b60bc7c096620b1030705f3b908d/django-shareddb-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e50e00c4fd0ab5bb814698a6bcc6d44d", "sha256": "2417df2886dd45805faedb9e1052a0b5d5455876f44e652c97b1975de6ff819f" }, "downloads": -1, "filename": "django-shareddb-0.1.2.tar.gz", "has_sig": false, "md5_digest": "e50e00c4fd0ab5bb814698a6bcc6d44d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8610, "upload_time": "2014-06-01T10:39:33", "url": "https://files.pythonhosted.org/packages/92/d7/93a3ccb2294fb15ed8e6277238a8dadb603757c6499636acff29e15e1213/django-shareddb-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e50e00c4fd0ab5bb814698a6bcc6d44d", "sha256": "2417df2886dd45805faedb9e1052a0b5d5455876f44e652c97b1975de6ff819f" }, "downloads": -1, "filename": "django-shareddb-0.1.2.tar.gz", "has_sig": false, "md5_digest": "e50e00c4fd0ab5bb814698a6bcc6d44d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8610, "upload_time": "2014-06-01T10:39:33", "url": "https://files.pythonhosted.org/packages/92/d7/93a3ccb2294fb15ed8e6277238a8dadb603757c6499636acff29e15e1213/django-shareddb-0.1.2.tar.gz" } ] }