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:
parent
e905ba4406
commit
1eea81171a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user