Beispiel #1
0
def create_list(list_name):
    list_name = list_name.lower()
    mlist = find_list(list_name)
    sim_pri, sim_sec = stem_and_meta(list_name)

    if not mlist:
        mlist = MailingList(archive_url = "/archives/" + list_name,
                            archive_queue = "/queues/" + list_name,
                            name=list_name,
                            similarity_pri = sim_pri,
                            similarity_sec = sim_sec)
        mlist.save()
        build_index()

    return mlist
def test_build_index():
    archive.build_index()
    assert os.path.exists(settings.ARCHIVE_BASE + "/lists.html")
Beispiel #3
0
def test_build_index():
    archive.build_index()
    assert os.path.exists(settings.ARCHIVE_BASE + "/lists.html")