def mongodb_connect(host = config.MONGODB_HOST, port = config.MONGODB_PORT):
    """
    An overloaded version of :func:`lisogo.model.mongo_client.connect()` that
    defines default values of the parameters from the application
    configuration.

    seealso:: Module :mod:`~lisogo.model.mongo_client` to learn more about what
    :func:`connect()` does.
    """
    return mongo_client.connect(host, port)
示例#2
0
 def setUp(self):
     self.con = connect(config.MONGODB_HOST, config.MONGODB_PORT)
     self.db = select_db(self.con, config.MONGODB_DB_NAME, 'tests.lisogo.model')