{ "info": { "author": "Anton Baklanov", "author_email": "antonbaklanov@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Testing" ], "description": ":VERSION: 0.1\n\n.. image:: https://travis-ci.org/bak1an/wsgitestcase.png?branch=master\n :target: https://travis-ci.org/bak1an/wsgitestcase\n\nTestCase that will launch your wsgi/werkzeug application in a separate thread\nfor you (using *setUp* and *tearDown* methods).\n\nInspired by Django's LiveServerTestCase.\n\nHow to\n------\n\n.. code:: python\n\n import requests # you should use this, requests is cool\n from wsgitestcase import WsgiTestCase\n\n class MyTestCase(WsgiTestCase):\n\n # add your wsgi application here\n # you can also set it with something like\n # app = staticmethod(my_wsgi_app)\n # see tests.py for more examples\n @staticmethod\n def app(environ, start_response):\n start_response('200 OK', [('Content-Type', 'text/plain')])\n yield 'Hello World'\n\n def test_something(self):\n # server with your app should be already up\n # use self.host, self.port and self.url to find out where it is\n r = requests.get(\"http://%s:%s/\" % (self.host, self.port))\n self.assertEqual(r.text, \"Hello World\")\n # in self.requests you can find a list with all requests made to\n # your app. it contains werkzeug's Request objects.\n # see tests.py for more examples\n # and werkzeug's doc at http://werkzeug.pocoo.org/docs/wrappers/\n # for Request object reference\n self.assertEqual(len(self.requests), 1)\n self.assertEqual(self.requests[0].path, \"/\")\n\n\nLicense\n-------\n\nwsgitestcase is distributed under terms of MIT license.", "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/bak1an/wsgitestcase", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "wsgitestcase", "package_url": "https://pypi.org/project/wsgitestcase/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/wsgitestcase/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bak1an/wsgitestcase" }, "release_url": "https://pypi.org/project/wsgitestcase/0.1/", "requires_dist": null, "requires_python": null, "summary": "TestCase that will launch your wsgi/werkzeug application in a separate thread for you", "version": "0.1" }, "last_serial": 934866, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "baa3417c0591d6bfd572ee550518c15e", "sha256": "813f8c6d2007981014bcbd839c1de5745265cf43383dcc5144d32200d1817b6c" }, "downloads": -1, "filename": "wsgitestcase-0.1.tar.gz", "has_sig": false, "md5_digest": "baa3417c0591d6bfd572ee550518c15e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4800, "upload_time": "2013-12-03T16:34:58", "url": "https://files.pythonhosted.org/packages/72/78/92a8934fc6c007eb123f189db186b7922595dcb7e0096055a459e78e532f/wsgitestcase-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "baa3417c0591d6bfd572ee550518c15e", "sha256": "813f8c6d2007981014bcbd839c1de5745265cf43383dcc5144d32200d1817b6c" }, "downloads": -1, "filename": "wsgitestcase-0.1.tar.gz", "has_sig": false, "md5_digest": "baa3417c0591d6bfd572ee550518c15e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4800, "upload_time": "2013-12-03T16:34:58", "url": "https://files.pythonhosted.org/packages/72/78/92a8934fc6c007eb123f189db186b7922595dcb7e0096055a459e78e532f/wsgitestcase-0.1.tar.gz" } ] }