

@patch('__builtin__.open')
@patch('os.access', Mock(return_value=True))
@patch.object(Collector, 'publish')
def test_should_open_proc_vmstat(self, publish_mock, open_mock):
    open_mock.return_value = StringIO('')
    open_mock.collector.collect()
    open_mock.assert_called_once_with('/proc/vmstat')

dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/vmstat/test/testvmstat.py TestVMStatCollector.test_should_open_proc_vmstat/VarMisuse@52/78 `self`->`open_mock`