

@run_only_if_pymongo_is_available
@patch('pymongo.Connection')
@patch.object(Collector, 'publish')
def test_should_ignore_unneeded_databases(self, publish_mock, connector_mock):
    self._annotate_connection(connector_mock, {
        
    })
    self.collector.collect()
    assert (call('baddb') not in self.connection.__getitem__.call_args_list)

dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/mongodb/test/testmongodb.py TestMongoDBCollector.test_should_ignore_unneeded_databases/original