コード例 #1
0
if __name__ == "__main__" :

    from django.conf import settings
    settings.SEARCH_STORAGE_PATH = settings.SEARCH_STORAGE_PATH  + "_test"
    settings.SEARCH_STORAGE_TYPE = "fs"
    settings.DEBUG = False

    from django.db.models import Q

    import core
    import models as models_tests

    models_tests.add()

    models_tests.cleanup_index()
    models_tests.cleanup_docs()
    models_tests.insert_docs(3)

    unittest.main(testRunner=models_tests.SearcherTestRunner(verbosity=2))
    sys.exit()



"""
Description
-----------


ChangeLog
---------
コード例 #2
0
        )


if __name__ == "__main__":

    from django.conf import settings
    settings.SEARCH_STORAGE_PATH = settings.SEARCH_STORAGE_PATH + "_tests"
    settings.SEARCH_STORAGE_TYPE = "fs"
    settings.DEBUG = False

    import core, pylucene, document
    import models as models_tests

    core.register_indexes(models_tests)

    models_tests.cleanup_index()
    models_tests.cleanup_docs()
    models_tests.insert_docs(1)

    unittest.main(testRunner=models_tests.SearcherTestRunner(verbosity=2))
    sys.exit()
"""
Description
-----------


ChangeLog
---------


Usage