A plugin to show lint errors for IW
Project description
flake8_iw
IW01: Use of patch
Lint check to prevent the use of patch
directly.
Recommendation: Use PatchingTestCase
/ PatchingTransactionTestCase
instead
from unittest.mock import patch
from unittest.mock import patch as patch_alias
class SignUpUpdatedTests(TestCase):
def setUp(self):
self.patcher = patch("apps.auth.signals.task_send_email.delay")
def test_created(self, mock_task):
self.mock_call = patch_alias("apps.auth.signals.task_send_email.delay")
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flake8_iw-0.0.6.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file flake8_iw-0.0.6.tar.gz
.
File metadata
- Download URL: flake8_iw-0.0.6.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc1e570a502764fa411754ac81e076c74d0b3fd93c13a653962d29eadaab3666 |
|
MD5 | a3d13bdee1040721621e5865ec0af6de |
|
BLAKE2b-256 | 47a4d8699c57dfe4ed6c965328ebdef99db9d22363def39f45b9877d17087464 |
File details
Details for the file flake8_iw-0.0.6-py2.py3-none-any.whl
.
File metadata
- Download URL: flake8_iw-0.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6043a4d8d8c20fcc565c96230e481045f23007ee9ffc5aed303982a40ff586b1 |
|
MD5 | 04bac6b052759d75aef1a626c65e54ef |
|
BLAKE2b-256 | 1051fd078103c8e74c77ac31476e241bd6275d48c2aa950142d0f1842dec6e68 |