def __find_user__(self, credential):
        v = self.mongo_client.server_info()['version']
        if v < '2.6':
            return getattr(self.mongo_client, credential.database.name).system.users.find_one({"user": credential.user})
        else:
            return getattr(self.mongo_client, "admin").system.users.find_one({"user": credential.user, "db": credential.database.name})
dataset/ETHPy150Open globocom/database-as-a-service/dbaas/drivers/tests/test_driver_pymongo.py/ManageCredentialsMongoDBTestCase.__find_user__/original