unisquid


Nameunisquid JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/beylsp/unisquid
SummaryYet another unittest extension for python.
upload_time2016-08-01 20:04:23
maintainerNone
docs_urlNone
authorPatrik Beyls
requires_pythonNone
licenseMIT
keywords testing
VCS
bugtrack_url
requirements six
Travis-CI No Travis.
coveralls test coverage
            ********
unisquid
********

Yet another unittest extension for python.

Live Server Test Case 
---------------------

The LiveServerTestCase extension does basically the same as
unittest.TestCase but also launches a live http server in a 
separate thread.

A comma-separated list of ports or a range of ports can be specified
in the hope the live server can find one that is free to use for the
WSGI server. The range may be of the form: '8000-8010,8080,9020-9300'
and will be read from the 'LIVE_TEST_SERVER_ADDRESS' environment variable.

The function create_app() is used to return the handler used by the WSGI server.

Example
-------

.. code-block:: python

    import unisquid
    import urllib
    import wsgiref


    class TestLiveServer(unisquid.LiveServerTestCase):
        def create_app(self):
            return wsgiref.simple_server.demo_app

        def test_server_process_listening(self):
            response = urllib.urlopen(self.live_server_url)
            self.assertTrue(b'Hello world!' in response.read())
            self.assertEqual(response.code, 200)
            

Raw data

            {
    "_id": null,
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "cheesecake_code_kwalitee_id": null,
    "keywords": "testing",
    "upload_time": "2016-08-01 20:04:23",
    "requirements": [
        {
            "name": "six",
            "specs": []
        }
    ],
    "author": "Patrik Beyls",
    "home_page": "https://github.com/beylsp/unisquid",
    "github_user": "beylsp",
    "download_url": "https://pypi.python.org/packages/a3/35/49c6675dfa9c9b2f9f6baba845f8b5e8e8beb3843ae319ae7bebdb66737c/unisquid-1.0.1.tar.gz",
    "platform": "UNKNOWN",
    "version": "1.0.1",
    "cheesecake_documentation_id": null,
    "description": "********\nunisquid\n********\n\nYet another unittest extension for python.\n\nLive Server Test Case \n---------------------\n\nThe LiveServerTestCase extension does basically the same as\nunittest.TestCase but also launches a live http server in a \nseparate thread.\n\nA comma-separated list of ports or a range of ports can be specified\nin the hope the live server can find one that is free to use for the\nWSGI server. The range may be of the form: '8000-8010,8080,9020-9300'\nand will be read from the 'LIVE_TEST_SERVER_ADDRESS' environment variable.\n\nThe function create_app() is used to return the handler used by the WSGI server.\n\nExample\n-------\n\n.. code-block:: python\n\n    import unisquid\n    import urllib\n    import wsgiref\n\n\n    class TestLiveServer(unisquid.LiveServerTestCase):\n        def create_app(self):\n            return wsgiref.simple_server.demo_app\n\n        def test_server_process_listening(self):\n            response = urllib.urlopen(self.live_server_url)\n            self.assertTrue(b'Hello world!' in response.read())\n            self.assertEqual(response.code, 200)",
    "lcname": "unisquid",
    "name": "unisquid",
    "github": true,
    "bugtrack_url": null,
    "license": "MIT",
    "travis_ci": false,
    "github_project": "unisquid",
    "summary": "Yet another unittest extension for python.",
    "split_keywords": [
        "testing"
    ],
    "author_email": "UNKNOWN",
    "urls": [
        {
            "has_sig": false,
            "upload_time": "2016-08-01T20:04:23",
            "comment_text": "",
            "python_version": "source",
            "url": "https://pypi.python.org/packages/a3/35/49c6675dfa9c9b2f9f6baba845f8b5e8e8beb3843ae319ae7bebdb66737c/unisquid-1.0.1.tar.gz",
            "md5_digest": "54bef3b3b2d14ae8a3f3a05e3a285184",
            "downloads": 0,
            "filename": "unisquid-1.0.1.tar.gz",
            "packagetype": "sdist",
            "path": "a3/35/49c6675dfa9c9b2f9f6baba845f8b5e8e8beb3843ae319ae7bebdb66737c/unisquid-1.0.1.tar.gz",
            "size": 5191
        }
    ],
    "cheesecake_installability_id": null,
    "coveralls": true
}
        
Elapsed time: 0.03073s