{ "info": { "author": "Val\u00e9rian Saliou", "author_email": "valerian@valeriansaliou.name", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python" ], "description": "Django Request Mock\n===================\n\nDjango Request Mock is an helper that allows you to generate synthetic request objects that mimic a real one, generated after a real request is being received by the framework.\n\nUseful when coding in an HTTP isolated environment, which prevents you from accessing the request object, such as a cron method or a Celery task. This allows you to render templates and build absolute URIs from such contexts, for instance.\n\nThe request object is generated using your settings, and by default contains all the values of a request being sent to your website's default domain, using the SITE_URL configuration variable (can be of that form: https://example.com/)\n\n## Configuration\n\n* Ensure `SITE_URL` is defined in your **settings.py**, with a value such as 'https://example.com/'\n\n* When you need to generate a request mock object, simply use the following code:\n\n```python\nfrom request_mock import request_mock\n\n# Generate the mock object\n# request_mock(base, path, user) where each argument is optional\nrequest = request_mock()\n\n# Can also be\nrequest = request_mock(\n base='https://other.org/',\n path='/some/path/for/mock/request/',\n user=User.objects.get(username='dummy.user')\n)\n```\n\n* All done!", "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/valeriansaliou/django-request-mock", "keywords": null, "license": "MIT - http://opensource.org/licenses/mit-license.php", "maintainer": null, "maintainer_email": null, "name": "django-request-mock", "package_url": "https://pypi.org/project/django-request-mock/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-request-mock/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/valeriansaliou/django-request-mock" }, "release_url": "https://pypi.org/project/django-request-mock/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Create a Django request object that mocks a real one.", "version": "0.1.4" }, "last_serial": 1023231, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "a7904f40463092bff5b1908310748cbe", "sha256": "ec309d438a3570a2ecc492e9f55f47cbe3c8f67c0c981c10d4036ddf00d491b0" }, "downloads": -1, "filename": "django-request-mock-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a7904f40463092bff5b1908310748cbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2341, "upload_time": "2014-03-07T16:21:13", "url": "https://files.pythonhosted.org/packages/5a/70/f0f307c6938d755c741c3e43adb1f36f33389783bfe7841826fc335b4094/django-request-mock-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "74776aa936eb62d77243f0c0f21bf3bc", "sha256": "370a6f1ecf2220bff3043c478f5743d9db80800f2edc54ddc609b9d5af44744e" }, "downloads": -1, "filename": "django-request-mock-0.1.2.tar.gz", "has_sig": false, "md5_digest": "74776aa936eb62d77243f0c0f21bf3bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2611, "upload_time": "2014-03-07T16:27:50", "url": "https://files.pythonhosted.org/packages/64/6f/f68b635ef86bc449ff55fa320d5555ae60a7599b8381c22698af5d3c67be/django-request-mock-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "cf9b9d069d22591a5df0f25484ec786c", "sha256": "08e32b893b012608594de17fb279d5d74bd0ced917ac2a0e6739d3a19dfa8428" }, "downloads": -1, "filename": "django-request-mock-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cf9b9d069d22591a5df0f25484ec786c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2606, "upload_time": "2014-03-07T16:33:10", "url": "https://files.pythonhosted.org/packages/e7/7d/009afa61a2fc9e95527f6c847c648071d75bf02de4adbea4e0d776bac652/django-request-mock-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "b6de95431a907d44d5f2e562ccf8a9fb", "sha256": "c9db369ee9ed004e8d468ed42d1db74ee8f452942c498d1e18e2cdf981faab99" }, "downloads": -1, "filename": "django-request-mock-0.1.4.tar.gz", "has_sig": false, "md5_digest": "b6de95431a907d44d5f2e562ccf8a9fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2589, "upload_time": "2014-03-08T13:32:04", "url": "https://files.pythonhosted.org/packages/c1/77/8e369e3f5c965c54e426d6ae2a8f9ef6c01cb90ec6641152340e8a48227c/django-request-mock-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6de95431a907d44d5f2e562ccf8a9fb", "sha256": "c9db369ee9ed004e8d468ed42d1db74ee8f452942c498d1e18e2cdf981faab99" }, "downloads": -1, "filename": "django-request-mock-0.1.4.tar.gz", "has_sig": false, "md5_digest": "b6de95431a907d44d5f2e562ccf8a9fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2589, "upload_time": "2014-03-08T13:32:04", "url": "https://files.pythonhosted.org/packages/c1/77/8e369e3f5c965c54e426d6ae2a8f9ef6c01cb90ec6641152340e8a48227c/django-request-mock-0.1.4.tar.gz" } ] }