{ "info": { "author": "Alejandro Pereira", "author_email": "alepereira.dev@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance" ], "description": "Flake8 Mock plugin\n==================\n\nRemember that a mock's job is to say, \"You got it, boss\" whenever anyone calls\nit. It will do real work, like raising an exception, when one of its\nconvenience methods is called, like ``assert_called_once_with``. But it won't\ndo real work when you call a method that only *resembles* a convenience method,\nsuch as ``assert_called_once`` (no ``_with``!). Sometimes developers may not\nnotice that they are using a non-existent mock method, because they are not\ngetting an output error telling them so. And for some reason they can also\nforget to verify that the test cases fail before writing implementation code.\n\nThis plugin checks for possible non-existent mock methods when you run\n``flake8``, the Python code checker.\n\nInspired by http://engineeringblog.yelp.com/2015/02/assert_called_once-threat-or-menace.html.\n\n\nInstallation\n------------\n\nYou can install or upgrade ``flake8-mock`` with these commands::\n\n $ pip install flake8-mock\n $ pip install --upgrade flake8-mock\n\n\nList of non-existent methods checked\n------------------------------------\n\n * ``assert_calls``\n * ``not_called``\n * ``called_once``\n * ``called_once_with``\n\n\nPlugin for Flake8\n-----------------\n\nWhen both ``flake8 2.4`` and ``flake8-mock`` are installed, the plugin is\navailable in ``flake8``::\n\n $ flake8 --version\n 2.4.1 (pep8: 1.5.7, flake8-mock: 0.3, pyflakes: 0.8.1)\n\n\nExample output\n--------------\n\nOnce you run flake8, you can have something like::\n\n $ flake8 test_file.py\n test_file.py:27:1: M001 assert_calls is a non-existent mock method.\n test_file.py:28:1: M001 called_once_with is a non-existent mock method.\n test_file.py:39:1: M001 not_called is a non-existent mock method.\n test_file.py:40:1: M001 assert_called is a non-existent mock method.\n\nCredits\n-------\n * Alejandro Gabriel Pereira is the main author.\n * Nejc Zupan (`NiteoWeb Ltd. `_) provided the idea\n and proof-reading.\n\nCollaborators\n-------------\n * `John Vandenberg `_\n * `Tom Prince `_\n\n\nChanges\n-------\n\n0.3 (09-10-2016)\n````````````````\n* Don't warn on `assert_not_called`, `assert_called` or `assert_called_once`.\n* Use ASCII only in README.rst\n\n0.2 (12-16-2015)\n````````````````\n* Add Python 3 compatibility.\n\n0.1 (10-20-2015)\n````````````````\n* First release.\n\n0.1dev0 (10-19-2015)\n````````````````````\n* First dev release.", "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/aleGpereira/flake8-mock", "keywords": "flake8,mock,testing", "license": "GNU", "maintainer": null, "maintainer_email": null, "name": "flake8-mock", "package_url": "https://pypi.org/project/flake8-mock/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/flake8-mock/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/aleGpereira/flake8-mock" }, "release_url": "https://pypi.org/project/flake8-mock/0.3/", "requires_dist": null, "requires_python": null, "summary": "Provides checking for non-existent mock methods", "version": "0.3" }, "last_serial": 4054727, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e8f0781fc317f473c2d5381e0fc1dd53", "sha256": "c9602d914458d94dcc3086296b3c617c9c2838ca4a2a225327312343a03f5d11" }, "downloads": -1, "filename": "flake8-mock-0.1.tar.gz", "has_sig": false, "md5_digest": "e8f0781fc317f473c2d5381e0fc1dd53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3315, "upload_time": "2015-10-20T19:56:51", "url": "https://files.pythonhosted.org/packages/07/27/89448ac93af7c75b0de29ed4f25a5b04afdf1657de94ced144014cadd5f2/flake8-mock-0.1.tar.gz" } ], "0.1.dev0": [ { "comment_text": "", "digests": { "md5": "5010f441c36cd08b75a6465d02b75478", "sha256": "5fbe59f553cc0afd88ad99656c16db3d195b8b9c877646abab7322607ecb9f95" }, "downloads": -1, "filename": "flake8-mock-0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "5010f441c36cd08b75a6465d02b75478", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3099, "upload_time": "2015-10-19T22:22:36", "url": "https://files.pythonhosted.org/packages/ea/ea/392f97e1af1a713418b6767326542c4c6def780afba6bb2b897f023bed5e/flake8-mock-0.1.dev0.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "36240f743a5838d2832839e01f568d95", "sha256": "1a92671a7ac847bee629a2e8dec96a3cc20dd7e7a5e572449d76803d4a71bd75" }, "downloads": -1, "filename": "flake8-mock-0.2.tar.gz", "has_sig": false, "md5_digest": "36240f743a5838d2832839e01f568d95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3315, "upload_time": "2015-12-16T12:14:25", "url": "https://files.pythonhosted.org/packages/3e/1c/767b1b68280e39857841b4deadc929fed034432015dcf57ea3cb49ba147e/flake8-mock-0.2.tar.gz" } ], "0.2.dev0": [ { "comment_text": "", "digests": { "md5": "34effd7947324365163528289f6ce5e6", "sha256": "b44fc38e021c89b1ed63b5b6615e03bdca0b8c6e574b83b0e28f26d16faeeaa1" }, "downloads": -1, "filename": "flake8-mock-0.2.dev0.tar.gz", "has_sig": false, "md5_digest": "34effd7947324365163528289f6ce5e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3295, "upload_time": "2015-12-15T19:56:30", "url": "https://files.pythonhosted.org/packages/c0/b5/f90b415c549e24b603d3b1a922a0e66add6b14d5a0bc50f0ad9ad2fc1434/flake8-mock-0.2.dev0.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "dfd9d37e2deef74181abaa562ee0327e", "sha256": "2fa775e7589f4e1ad74f35d60953eb20937f5d7355235e54bf852c6837f2bede" }, "downloads": -1, "filename": "flake8-mock-0.3.tar.gz", "has_sig": false, "md5_digest": "dfd9d37e2deef74181abaa562ee0327e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3484, "upload_time": "2016-09-10T15:49:57", "url": "https://files.pythonhosted.org/packages/00/b8/af88a8c6e37858d28700e6e51dc93d10f5deaca317f135b77f6db3bdb6b8/flake8-mock-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dfd9d37e2deef74181abaa562ee0327e", "sha256": "2fa775e7589f4e1ad74f35d60953eb20937f5d7355235e54bf852c6837f2bede" }, "downloads": -1, "filename": "flake8-mock-0.3.tar.gz", "has_sig": false, "md5_digest": "dfd9d37e2deef74181abaa562ee0327e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3484, "upload_time": "2016-09-10T15:49:57", "url": "https://files.pythonhosted.org/packages/00/b8/af88a8c6e37858d28700e6e51dc93d10f5deaca317f135b77f6db3bdb6b8/flake8-mock-0.3.tar.gz" } ] }