{ "info": { "author": "Jun Young Lee", "author_email": "legshort@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "# Light weight BDD Pattern\n\n## Installation\n* `pip install apple-mango`\n\n## Goal\n* Easy to Use\n* Compatible with Python unittest\n* Compatible with existing test code\n* Support Python3\n\n## Next Step\n* Register to pypi\n* Add CI\n* Support pytest\n\n## Usage\n* Define regular test class\n* Define regular test method with `@mango.given()`\n* Define inner `when` method with `@mango.when()`\n* Define inner `then` method with `@mango.then()`\n* Run python test: `python -m unittest test_file.py`\n* No need to call inner `when` and `then` method becuase `given(), when(), then()` decorators will take care of it\n\n### Example\n```python\n# test_exampel.py\n\nclass MangoUseCase(TestCase):\n def setUp(self):\n self.user = 'jun'\n\n @mango.given('I am logged-in user')\n def test_profile(self):\n self.given.user_profile = 'my_profile'\n self.given.user_photo = 'my_photo'\n\n self.given.notifications_count = 3\n self.given.unread_notifications_count = 1\n\n @mango.when('I click profile')\n def when_click_profile():\n print('click')\n\n @mango.then('I see profile')\n def then_profile():\n self.assertEqual(self.given.user_profile, 'my_profile')\n\n @mango.then('I see my photo')\n def then_photo():\n self.assertEqual(self.given.user_photo, 'my_photo')\n\n @mango.when('I click notification')\n def when_click_notification():\n print('click')\n\n @mango.then('I see 3 notifications')\n def then_notification():\n self.assertEqual(self.given.notifications_count, 3)\n\n @mango.then('I see 1 unread notification')\n def then_unread_notification():\n self.assertEqual(self.given.unread_notifications_count, 1)\n\n @mango.given('I am logged-out user')\n def test_auth(self):\n self.given.status_code = 401\n\n @mango.when('I access profile by url')\n def when_access_profile():\n print('access profile')\n\n @mango.then('I see 401 error')\n def then_error():\n self.assertEqual(self.given.status_code, 401)\n\n```\n\n### Run Example\n```python\npython -m unittest test_example.py\n```\n\n## Contributing\n\n### Run Test\n```python\npython -m unittest tests/test_mango.py\n```\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/legshort/apple-mango/", "keywords": "tdd,bdd,test", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "apple-mango", "package_url": "https://pypi.org/project/apple-mango/", "platform": "", "project_url": "https://pypi.org/project/apple-mango/", "project_urls": { "Homepage": "https://github.com/legshort/apple-mango/" }, "release_url": "https://pypi.org/project/apple-mango/0.2/", "requires_dist": [ "wrapt (>=1.10.0)" ], "requires_python": "", "summary": "Light weight BDD Pattern", "version": "0.2" }, "last_serial": 3590164, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ce19699bde1c9e09a31288d880e2d57a", "sha256": "481ab68cbadcaf05799a826986910ede9137f1f58c1c6c06b95bf4a4239b4b64" }, "downloads": -1, "filename": "apple_mango-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ce19699bde1c9e09a31288d880e2d57a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4038, "upload_time": "2018-02-06T13:28:34", "url": "https://files.pythonhosted.org/packages/dd/84/31bec0af333bd300a03d2f7a7f560847209a842dcce7e1eb334ca52933c3/apple_mango-0.1-py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "f5503ca4b792254fbfbea498bb8ecc43", "sha256": "ad3b069b9e7afb1d8b18d7dcb7e6847b4aa435c67574f0195a95455248192f1b" }, "downloads": -1, "filename": "apple_mango-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f5503ca4b792254fbfbea498bb8ecc43", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4583, "upload_time": "2018-02-17T08:29:46", "url": "https://files.pythonhosted.org/packages/0f/00/541ab2ffdf4e67933b7ad984ff0d7784fd05f547d70317b7f07fd9fe9f9d/apple_mango-0.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5503ca4b792254fbfbea498bb8ecc43", "sha256": "ad3b069b9e7afb1d8b18d7dcb7e6847b4aa435c67574f0195a95455248192f1b" }, "downloads": -1, "filename": "apple_mango-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f5503ca4b792254fbfbea498bb8ecc43", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4583, "upload_time": "2018-02-17T08:29:46", "url": "https://files.pythonhosted.org/packages/0f/00/541ab2ffdf4e67933b7ad984ff0d7784fd05f547d70317b7f07fd9fe9f9d/apple_mango-0.2-py3-none-any.whl" } ] }