本文整理匯總了Python中globaleaks.settings.GLSettings.eval_paths方法的典型用法代碼示例。如果您正苦於以下問題:Python GLSettings.eval_paths方法的具體用法?Python GLSettings.eval_paths怎麽用?Python GLSettings.eval_paths使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類globaleaks.settings.GLSettings
的用法示例。
在下文中一共展示了GLSettings.eval_paths方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setUp
# 需要導入模塊: from globaleaks.settings import GLSettings [as 別名]
# 或者: from globaleaks.settings.GLSettings import eval_paths [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']
示例2: init_glsettings_for_unit_tests
# 需要導入模塊: from globaleaks.settings import GLSettings [as 別名]
# 或者: from globaleaks.settings.GLSettings import eval_paths [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()