Add tests to show '# noqa' works with mock.patch check

Add two test lines to show that using '# noqa' will work to disable
the mock.patch check that requires using autospec.

Change-Id: I4c5777867265c15469e2f34e8e9dea49fa7bff98
This commit is contained in:
John L. Villalovos 2017-07-26 09:05:21 -07:00
parent e905ba4406
commit 1eea81171a
1 changed files with 2 additions and 0 deletions

View File

@ -31,7 +31,9 @@ class MockAutospecCheck(object):
Okay: mock.patch('target_module_1', spec_set=['data'])
H210: mock.patch('target_module_1')
Okay: mock.patch('target_module_1') # noqa
H210: mock.patch('target_module_1', somearg=23)
Okay: mock.patch('target_module_1', somearg=23) # noqa
Okay: mock.patch.object('target_module_2', 'attribute', autospec=True)
Okay: mock.patch.object('target_module_2', 'attribute', autospec=False)