{ "info": { "author": "Vanguardistas LLC", "author_email": "zope-dev@zope.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Programming Language :: Python", "Topic :: Software Development :: Testing" ], "description": ".. contents::\n\nvan.testing provides tools for testing zope3/WSGI based applications that do\nnot use the ZODB or local utilities.\n\nTesting Utilities\n-----------------\n\nThe most common use of this testing module is functional testing zope\napplications. It provides tools to setup layers which load the configuration\nZCML as well as setting up wsgi_intercept in a layer.\n\nThis test is part of such a layer (setup in van.testing.tests.FunctionalLayer):\n\n >>> from wsgi_intercept import WSGI_HTTPConnection as HTTPConnection\n >>> conn = HTTPConnection('localhost', 80)\n\n >>> conn.request('GET', '/')\n >>> r = conn.getresponse()\n >>> print r.read() # doctest: +ELLIPSIS\n {'HTTP_ACCEPT_ENCODING': 'identity',\n 'HTTP_HOST': 'localhost',\n 'PATH_INFO': '/',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '127.0.0.1',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': '',\n 'SERVER_NAME': 'localhost',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.1\\r\\n',\n 'wsgi.errors': ,\n 'wsgi.input': ,\n 'wsgi.multiprocess': 0,\n 'wsgi.multithread': 0,\n 'wsgi.run_once': 0,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}\n Marker: MARKER\n\nLayers\n------\n\nSome basic layers useful for making test setups.\n\n >>> import os.path\n >>> from van.testing.layer import zcml_layer, null_layer\n\nA zcml layer which sets up and tears down a zcml test harness (but is much\nsimpler than that provided with zope.app.functional):\n\n >>> class ZCMLLayer:\n ... zcml = os.path.join(os.path.dirname(__file__), 'ftesting.zcml')\n >>> zcml_layer(ZCMLLayer)\n\nSome default layers are provided for use with zope.testing, a \"null\" layer that\nspecifically does nothing. This is useful for layers which inherit from other\nlayers but where you don't want setup/teardown functions run twice (is this a\nzope.testing bug?):\n\n >>> class ExampleNullLayer(ZCMLLayer):\n ... pass\n >>> null_layer(ExampleNullLayer)\n\nThis test runs in the layer van.testing.tests.ZCMLLayer, so we can get the\n\"test\" utility but not the test_extra utility (see zcml_features.txt for an\nexample of a zcml layer with features):\n \n >>> from zope.interface import Interface\n >>> from zope.component import queryUtility\n >>> queryUtility(Interface, name=\"test\", default='None')\n 'MARKER'\n >>> queryUtility(Interface, name=\"test_extra\", default='None')\n 'None'\n\n\nChanges\n=======\n\n3.0.0 (2009-10-28)\n------------------\n\n- Add an option to have a zcml_features attribute on a zcml layer indicating\n the features to load when loading the zcml.\n\n2.0.1 (2009-04-07)\n------------------\n\n- Allow users to specify the domain and port of the wsgi_intercept_layer by\n adding those attributes to the class.\n- Fix testbrowser support a bit so that it performs more like\n zope.testbrowser.testing.Browser.\n- Remove support for local component registrys (zope.site). This brings in the\n whole ZODB as zope.site's tests currently depend on it.\n\n2.0.0 (2009-04-01)\n------------------\n\n- Remove dependencies by using zope.configuration.xmlconfig to setup zcml\n rather than zope.app.appsetup. This leaves out some security configuration\n but the win from less dependencies is massive. In my tests, no tests had any\n issues with this.\n- Add a wsgi_intercept layer and a functional_layer that combines both zcml\n and wsgi_intercept layer.\n\n1.0.0 (2008-11-21)\n------------------\n\n- Initial Release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/van.testing", "keywords": null, "license": "ZPL 2.1", "maintainer": null, "maintainer_email": null, "name": "van.testing", "package_url": "https://pypi.org/project/van.testing/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/van.testing/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/van.testing" }, "release_url": "https://pypi.org/project/van.testing/3.0.0/", "requires_dist": null, "requires_python": null, "summary": "Layers for zope.testing to simplify test setups", "version": "3.0.0" }, "last_serial": 642330, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "071feaf21679ea16c3bfd84fa1a73290", "sha256": "e251b46448b69b493af07b8de758c80b6fa945bcbfe54c8c8bdb6423fe219467" }, "downloads": -1, "filename": "van.testing-1.0.0.tar.gz", "has_sig": false, "md5_digest": "071feaf21679ea16c3bfd84fa1a73290", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4025, "upload_time": "2008-11-21T00:11:09", "url": "https://files.pythonhosted.org/packages/f8/71/dc4bb421b10821bc724450ec551e9ad85ef0827c78a318e2d00fe8f9f1a5/van.testing-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "030474e8cb42d35f18c88a2f8e739de7", "sha256": "e295beb8268666891d976d7e3dcf9ea3c6eaf99039a9c302de9172b3326ac796" }, "downloads": -1, "filename": "van.testing-2.0.0-py2.5.egg", "has_sig": false, "md5_digest": "030474e8cb42d35f18c88a2f8e739de7", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 10538, "upload_time": "2009-04-01T20:35:37", "url": "https://files.pythonhosted.org/packages/8a/c7/7631d59edaa9f9387cbe4e9cd21b5173339f9a771fda580b1ff995158205/van.testing-2.0.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "df069e0c1129fa72264f3ac821b295fb", "sha256": "cb3cefd621552c8e4f9e2c8dc55682ee676b087f6f313359dea7d4ee3eade58e" }, "downloads": -1, "filename": "van.testing-2.0.0.tar.gz", "has_sig": false, "md5_digest": "df069e0c1129fa72264f3ac821b295fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5657, "upload_time": "2009-04-01T20:35:57", "url": "https://files.pythonhosted.org/packages/46/5b/553db8a8d84afd6fb3cb7cf75272dbf3579273a5e576004528bfc093b0f3/van.testing-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "09f61ec87719c2d422c06b7214764914", "sha256": "fe3868898453498a6aca273c7a60a72d0ce6aeeba965c604e9acc5fb733835cc" }, "downloads": -1, "filename": "van.testing-2.0.1.tar.gz", "has_sig": false, "md5_digest": "09f61ec87719c2d422c06b7214764914", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6161, "upload_time": "2009-04-07T22:04:17", "url": "https://files.pythonhosted.org/packages/e8/9d/52bae3580a4e169363a1b0b705964f1a329a1e49749b954753c0c7e969c4/van.testing-2.0.1.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "aab7ad2abd49b09fc44c9f3ca8acbbb0", "sha256": "04fd7a0a8413f89348705a7c3b573fe76ca18e0006f62967f33f602c646c17b1" }, "downloads": -1, "filename": "van.testing-3.0.0.tar.gz", "has_sig": false, "md5_digest": "aab7ad2abd49b09fc44c9f3ca8acbbb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7672, "upload_time": "2009-10-28T14:53:29", "url": "https://files.pythonhosted.org/packages/4d/2e/0270a1bb5a3c9661b7b3e6cb104064ceda02b43bd9de2e0887a374d2c421/van.testing-3.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aab7ad2abd49b09fc44c9f3ca8acbbb0", "sha256": "04fd7a0a8413f89348705a7c3b573fe76ca18e0006f62967f33f602c646c17b1" }, "downloads": -1, "filename": "van.testing-3.0.0.tar.gz", "has_sig": false, "md5_digest": "aab7ad2abd49b09fc44c9f3ca8acbbb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7672, "upload_time": "2009-10-28T14:53:29", "url": "https://files.pythonhosted.org/packages/4d/2e/0270a1bb5a3c9661b7b3e6cb104064ceda02b43bd9de2e0887a374d2c421/van.testing-3.0.0.tar.gz" } ] }