

@patch.object(Collector, 'publish')
def test_should_fail_gracefully(self, publish_mock):
    collector_mock = patch.object(VarnishCollector, 'poll', Mock(return_value=self.getFixture('varnish_stats_blank').getvalue()))
    collector_mock.start()
    publish_mock.collector.collect()
    collector_mock.stop()
    self.assertPublishedMany(publish_mock, {
        
    })

dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/varnish/test/testvarnish.py TestVarnishCollector.test_should_fail_gracefully/VarMisuse@55/83 `self`->`publish_mock`