{ "info": { "author": "Jaime Gil de Sagredo Luna", "author_email": "jaimegildesagredo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===============\nTornado Expects\n===============\n\n.. image:: https://img.shields.io/pypi/v/tornado-expects.svg\n :target: https://pypi.python.org/pypi/tornado-expects\n :alt: Latest version\n\n.. image:: https://img.shields.io/pypi/dm/tornado-expects.svg\n :target: https://pypi.python.org/pypi/tornado-expects\n :alt: Number of PyPI downloads\n\n.. image:: https://secure.travis-ci.org/jaimegildesagredo/tornado-expects.svg?branch=master\n :target: http://travis-ci.org/jaimegildesagredo/tornado-expects\n\nTornado-Expects is a matchers library for the `Expects `_ assertion library. It provides matchers for the `Tornado web framework `_ request and response objects.\n\nInstallation\n============\n\nYou can install the last stable release from PyPI using *pip* or *easy_install*.\n\n.. code-block:: bash\n\n $ pip install tornado-expects\n\nAlso you can install the latest sources from *Github*.\n\n.. code-block:: bash\n\n $ pip install -e git+git://github.com/jaimegildesagredo/tornado-expects.git#egg=tornado-expects\n\nUsage\n=====\n\nJust import the ``expect`` callable and the Tornado-Expects matchers and start writing assertions for test doubles.\n\n.. code-block:: python\n\n from expects import expect\n from tornado_expects import *\n from tornado.httpclient import HTTPClient\n\n response = http_client.fetch('https://example.com')\n\n expect(response).to(be_ok)\n\nMatchers\n========\n\nbe_ok\n-----\n\n.. code-block:: python\n\n expect(response).to(be_ok)\n expect(response).not_to(be_ok)\n\nbe_json\n-------\n\n.. code-block:: python\n\n expect(response).to(be_json)\n expect(response).not_to(be_json)\n\n\nhave_header\n-----------\n\n.. code-block:: python\n\n expect(response).to(have_header('Content-Type'))\n expect(response).to(have_header('Content-Type', 'text/xml'))\n expect(response).to(have_header('Content-Type', start_with('text/xml')))\n expect(response).not_to(have_header('ETag'))\n\nhave_headers\n------------\n\n.. code-block:: python\n\n expect(response).to(have_headers('Content-Type', 'Content-Length'))\n expect(response).to(have_headers({'Content-Type': 'text/html'}))\n expect(response).not_to(have_headers('Etag', 'Authorization'))\n\nhave_status\n-----------\n\n.. code-block:: python\n\n expect(response).to(have_status(304))\n expect(response).not_to(have_status(500))\n\nSpecs\n=====\n\nTo run the specs you should install the testing requirements and then run ``mamba``.\n\n.. code-block:: bash\n\n $ python setup.py develop\n $ pip install -r test-requirements.txt\n $ mamba\n\nLicense\n=======\n\nThe Tornado-Expects is released under the `Apache2 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/jaimegildesagredo/tornado-expects", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "tornado-expects", "package_url": "https://pypi.org/project/tornado-expects/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tornado-expects/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jaimegildesagredo/tornado-expects" }, "release_url": "https://pypi.org/project/tornado-expects/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Expects matchers for Tornado request and response objects", "version": "0.1.0" }, "last_serial": 1193285, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5f977816e27fabc95fee661c43052dcc", "sha256": "f1763951bcffa8614b4413b0489759d9215cb294b7fbdaef6e084a50979b4e36" }, "downloads": -1, "filename": "tornado-expects-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5f977816e27fabc95fee661c43052dcc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3244, "upload_time": "2014-08-17T18:31:16", "url": "https://files.pythonhosted.org/packages/97/9d/0ac1ca6457ee94cd99e51abce832abf91584644f4ef3e51f86446eab7494/tornado-expects-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5f977816e27fabc95fee661c43052dcc", "sha256": "f1763951bcffa8614b4413b0489759d9215cb294b7fbdaef6e084a50979b4e36" }, "downloads": -1, "filename": "tornado-expects-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5f977816e27fabc95fee661c43052dcc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3244, "upload_time": "2014-08-17T18:31:16", "url": "https://files.pythonhosted.org/packages/97/9d/0ac1ca6457ee94cd99e51abce832abf91584644f4ef3e51f86446eab7494/tornado-expects-0.1.0.tar.gz" } ] }