當前位置: 首頁>>代碼示例>>Python>>正文


Python GLSettings.remove_directories方法代碼示例

本文整理匯總了Python中globaleaks.settings.GLSettings.remove_directories方法的典型用法代碼示例。如果您正苦於以下問題:Python GLSettings.remove_directories方法的具體用法?Python GLSettings.remove_directories怎麽用?Python GLSettings.remove_directories使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在globaleaks.settings.GLSettings的用法示例。


在下文中一共展示了GLSettings.remove_directories方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUp

# 需要導入模塊: from globaleaks.settings import GLSettings [as 別名]
# 或者: from globaleaks.settings.GLSettings import remove_directories [as 別名]
    def setUp(self):
        GLSettings.set_devel_mode()
        GLSettings.logging = None
        GLSettings.scheduler_threadpool = FakeThreadPool()
        GLSettings.sessions = {}
        GLSettings.failed_login_attempts = 0

        if os.path.isdir('/dev/shm'):
            GLSettings.working_path = '/dev/shm/globaleaks'
            GLSettings.ramdisk_path = '/dev/shm/globaleaks/ramdisk'
        else:
            GLSettings.working_path = './working_path'
            GLSettings.ramdisk_path = './working_path/ramdisk'

        GLSettings.eval_paths()
        GLSettings.remove_directories()
        GLSettings.create_directories()

        self.setUp_dummy()

        yield db.create_tables(self.create_node)

        for fixture in getattr(self, 'fixtures', []):
            yield import_fixture(fixture)

        yield import_memory_variables()

        # override of imported memory variables
        GLSettings.memory_copy.allow_unencrypted = True

        anomaly.Alarm.reset()
        event.EventTrackQueue.reset()
        statistics_sched.StatisticsSchedule.reset()

        self.internationalized_text = load_appdata()['node']['whistleblowing_button']
開發者ID:alitalia,項目名稱:GlobaLeaks,代碼行數:37,代碼來源:helpers.py

示例2: init_glsettings_for_unit_tests

# 需要導入模塊: from globaleaks.settings import GLSettings [as 別名]
# 或者: from globaleaks.settings.GLSettings import remove_directories [as 別名]
def init_glsettings_for_unit_tests():
    GLSettings.testing = True
    GLSettings.set_devel_mode()
    GLSettings.logging = None
    GLSettings.scheduler_threadpool = FakeThreadPool()
    GLSettings.sessions.clear()
    GLSettings.failed_login_attempts = 0
    GLSettings.working_path = './working_path'
    GLSettings.ramdisk_path = os.path.join(GLSettings.working_path, 'ramdisk')

    GLSettings.eval_paths()
    GLSettings.remove_directories()
    GLSettings.create_directories()
開發者ID:jpobley,項目名稱:GlobaLeaks,代碼行數:15,代碼來源:helpers.py


注:本文中的globaleaks.settings.GLSettings.remove_directories方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。