def many_server(request, pass_file, tempdir): sock = do_zeo_server(request, pass_file, tempdir) db = zerodb.DB(sock, username="******", password=TEST_PASSPHRASE, debug=True) with transaction.manager: for i in range(2000): db.add(Page(title="hello %s" % i, text="lorem ipsum dolor sit amet" * 2)) for i in range(1000): # Variable length while keeping number of terms the same # will cause variable scores db.add(Page(title="hello %s" % i, text="this is something we're looking for" * int(i ** 0.5))) db.add(Page(title="extra page", text="something else is here")) db.disconnect() return sock
def many_server(request, pass_file, tempdir): sock = do_zeo_server(request, pass_file, tempdir) db = zerodb.DB(sock, username="******", password=TEST_PASSPHRASE, debug=True) with transaction.manager: for i in range(2000): db.add( Page(title="hello %s" % i, text="lorem ipsum dolor sit amet" * 2)) for i in range(1000): # Variable length while keeping number of terms the same # will cause variable scores db.add( Page(title="hello %s" % i, text="this is something we're looking for" * int(i**0.5))) db.add(Page(title="extra page", text="something else is here")) db.disconnect() return sock
def zeo_server_aes_v0(request, pass_file, tempdir): # Use old pycryptodome encryption sock = do_zeo_server(request, pass_file, tempdir, dbclass=DBAESv0) create_objects_and_close(sock) return sock