{ "info": { "author": "David Delassus", "author_email": "david.jose.delassus@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "UnitTest to Canopsis connector\n=========================\n\n.. image:: https://travis-ci.org/linkdd/unittest2canopsis.svg?branch=master\n\n\nThis package provides a connector which will executes Python unittest to generate\nevents for Canopsis.\n\nUsage\n-----\n\nIn this example, we will use the following test (as ``mytest.py``):\n\n.. code-block:: python\n\n # -*- coding: utf-8 -*-\n\n import unittest\n\n\n class MyTestCase(unittest.TestCase):\n def test_success(self):\n self.assertTrue(True)\n\n def test_fail(self):\n self.assertFalse(True)\n\n\n if __name__ == '__main__':\n unittest.main()\n\nRun the unittest on :\n\n.. code-block::\n\n $ unittest2canopsis -t mytest.py -n mytest0 -a \"amqp://guest:guest@localhost:5672/\"\n unittest.mytest0.check.resource.MyTestCase.test_fail... FAIL\n unittest.mytest0.check.resource.MyTestCase.test_success... OK\n\nYou can also use a JSON configuration file :\n\n.. code-block:: javascript\n\n {\"tcp2canopsis\": {\n \"test\": \"mytest.py\",\n \"testname\": \"mytest0\",\n \"amqp\": \"amqp://guest:guest@localhost:5672/\"\n }}\n\nAnd load the file using :\n\n.. code-block::\n\n $ unittest2canopsis -c path/to/config.json\n\nExample of generated events :\n\n.. code-block:: javascript\n\n {\n \"timestamp\": 1418206046,\n \"connector\": \"unittest\",\n \"connector_name\": \"mytest0\",\n \"event_type\": \"check\",\n \"source_type\": \"resource\",\n \"component\": \"MyTestCase\",\n \"resource\": \"test_fail\",\n \"state\": 2,\n \"state_type\": 1,\n \"output\": \"Traceback (most recent call last):\\n File \\\"mytest.py\\\", line 11, in test_fail\\n self.assertFalse(True)\\nAssertionError: True is not false\\n\"\n }\n {\n \"timestamp\": 1418206046,\n \"connector\": \"unittest\",\n \"connector_name\": \"mytest0\",\n \"event_type\": \"check\",\n \"source_type\": \"resource\",\n \"component\": \"MyTestCase\",\n \"resource\": \"test_success\",\n \"state\": 0,\n \"state_type\": 1,\n \"output\": \"OK\"\n }\n\nInstallation\n------------\n\nJust type :\n\n.. code-block::\n\n $ pip install unittest2canopsis\n\nOr, to install it in a locally :\n\n.. code-block::\n\n $ ./makefile\n\nThis will create a virtual Python environment in the current folder, and install the dependencies listed by ``requirements.txt``.\nFinally, it will perform a ``python setup.py install``.\n\nAfter executing this script, the connector will be available in the current folder (which is now a virtual Python environment).\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/linkdd/unittest2canopsis/tarball/0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/linkdd/unittest2canopsis", "keywords": "canopsis,unittest", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "unittest2canopsis", "package_url": "https://pypi.org/project/unittest2canopsis/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/unittest2canopsis/", "project_urls": { "Download": "https://github.com/linkdd/unittest2canopsis/tarball/0.1", "Homepage": "https://github.com/linkdd/unittest2canopsis" }, "release_url": "https://pypi.org/project/unittest2canopsis/0.2/", "requires_dist": null, "requires_python": null, "summary": "Canopsis Connector which generate events from unittest", "version": "0.2" }, "last_serial": 1380657, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "8de291ef34c0e62cf2c509ebbddee507", "sha256": "6ed78e7b6193e0939c2a6c86c17b670641b8507618bf433bc979c12d8f629764" }, "downloads": -1, "filename": "unittest2canopsis-0.1.tar.gz", "has_sig": false, "md5_digest": "8de291ef34c0e62cf2c509ebbddee507", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3336, "upload_time": "2014-12-10T12:21:20", "url": "https://files.pythonhosted.org/packages/39/7f/eb9dad7b4dc20babe5a3a20624f8d660212e30e9ed862779ab729f9d1ad4/unittest2canopsis-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "6edcc15047b17d519f2dea7a148c1052", "sha256": "66b08721f0270be230026d10807a392d47dbb7f527775386713d7cc904d9986b" }, "downloads": -1, "filename": "unittest2canopsis-0.2.tar.gz", "has_sig": false, "md5_digest": "6edcc15047b17d519f2dea7a148c1052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3662, "upload_time": "2015-01-13T11:12:09", "url": "https://files.pythonhosted.org/packages/20/92/cf5f5e72e09ac901dd17ea97b0bc5dc203e3e99a1452f8945277bb834f83/unittest2canopsis-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6edcc15047b17d519f2dea7a148c1052", "sha256": "66b08721f0270be230026d10807a392d47dbb7f527775386713d7cc904d9986b" }, "downloads": -1, "filename": "unittest2canopsis-0.2.tar.gz", "has_sig": false, "md5_digest": "6edcc15047b17d519f2dea7a148c1052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3662, "upload_time": "2015-01-13T11:12:09", "url": "https://files.pythonhosted.org/packages/20/92/cf5f5e72e09ac901dd17ea97b0bc5dc203e3e99a1452f8945277bb834f83/unittest2canopsis-0.2.tar.gz" } ] }