

@patch.object(Collector, 'publish')
def test_should_work_with_real_data(self, publish_mock):
    VMStatCollector.PROC = self.getFixturePath('proc_vmstat_1')
    self.collector.collect()
    self.assertPublishedMany(publish_mock, {
        
    })
    VMStatCollector.PROC = self.getFixturePath('proc_vmstat_2')
    self.collector.collect()
    metrics = {
        'pgpgin': 0.0,
        'pgpgout': 9.2,
        'pswpin': 0.0,
        'pswpout': 0.0,
    }
    self.setDocExample(collector=self.collector.__class__.__name__, metrics=metrics, defaultpath=publish_mock.collector.config['path'])
    self.assertPublishedMany(publish_mock, metrics)

dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/vmstat/test/testvmstat.py TestVMStatCollector.test_should_work_with_real_data/VarMisuse@118/179 `self`->`publish_mock`