

def _annotate_connection(self, connector_mock, data):
    connector_mock.return_value = self.connection
    self.connection.db.command.return_value = data
    self.connection.database_names.return_value = ['db1', 'baddb']

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