本文整理汇总了Python中galicaster.core.conf.Conf.update_profiles方法的典型用法代码示例。如果您正苦于以下问题:Python Conf.update_profiles方法的具体用法?Python Conf.update_profiles怎么用?Python Conf.update_profiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类galicaster.core.conf.Conf
的用法示例。
在下文中一共展示了Conf.update_profiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestFunctions
# 需要导入模块: from galicaster.core.conf import Conf [as 别名]
# 或者: from galicaster.core.conf.Conf import update_profiles [as 别名]
class TestFunctions(TestCase):
def setUp(self):
conf_file = get_resource('profile/conf_good.ini')
conf_dist_file = get_resource('profile/conf-dist.ini')
folder_path = get_resource('profile/folder')
self.conf = Conf(conf_file,conf_dist_file, folder_path)
def no_test_create_profile(self):
profile=Profile("New profile")
self.assertEqual(profile.name, "New profile")
def no_test_create_and_add_profile(self):
self.setUp()
profile=Profile("New")
self.conf.add_profile(profile)
self.assertEqual(self.conf.get_profiles().has_key("New"),True)
def no_test_write_profile(self):
self.setUp()
folder_path = path.join(path.dirname(path.abspath(__file__)),
'resources', 'profile', 'folder')
profile=Profile("New profile", path.join(folder_path,"profile11.ini"))
self.conf.add_profile(profile)
self.conf.update_profiles()
path.isfile(path.join(folder_path,"profile11.ini"))
os.remove(path.join(folder_path,"profile11.ini"))
def no_test_write_profile_default_naming(self):
self.setUp()
folder_path = path.join(path.dirname(path.abspath(__file__)),
'resources', 'profile', 'folder')
profile=Profile("New profile")
profile.path=self.conf.get_free_profile()
self.conf.add_profile(profile)
self.conf.update_profiles()
path.isfile(path.join(folder_path,"profile1.ini"))
os.remove(path.join(folder_path,"profile1.ini"))
def no_test_delete_profile(self):
self.setUp()
folder_path = path.join(path.dirname(path.abspath(__file__)),
'resources', 'profile', 'folder')
profile=Profile("New")
profile.path=self.conf.get_free_profile()
self.conf.add_profile(profile)
self.conf.update_profiles()
profile.to_delete = True
self.conf.update_profiles()
self.assertEqual(path.isfile(path.join(folder_path,"profile1.ini")),False)
#os.remove(path.join(folder_path,"profile1.ini"))
return True
def change_parameters():
return True
def change_properties():
return True
def load_default_profile(self):
return True
def load_default_profile_on_dist(self):
return True
def see_all_tracks_in_conf(self):
return True
def look_for_an_unexisting_profile(self):
return True
def loof_for_an_existing_profile(self):
return True
def change_current_profile(self):
return True
def delete_current_profile(self):
return True
def set_default_to_current(self):
return True
def add_track():
return True
def delete_track():
return True
def get_video_areas_on_profile():
return True
def get_videos_areas_in_order():
return True
#.........这里部分代码省略.........