def test_not_changed(self): """Test that the default player doesn't change""" from watchvideo.main import get_default_player player_1 = get_default_player() player_2 = get_default_player() self.assertEqual(player_1, player_2)
def __init__(self, config_file): self.config_file = config_file self.defaults = {} self.defaults["General"] = { "version": c.VERSION, "media_player": main.get_default_player(), "use_builtin_player": int(HAS_PLAYER), "check_links_auto": 2, "global_video_quality": "", } self.defaults["DownloadOptions"] = { "download_folder": os.path.expanduser("~"), "after_download": 0, "double_click_downloads": 0 } self.defaults["Notification"] = {"notify_done": 2, "notify_error": 2} self.defaults["Window"] = {"state": "", "geometry": "", "show_search":2} self.map = {} self.map["folder"] = "download_folder" self.map["mediaplayer"] = "media_player" self.map["usebuiltinplayer"] = "use_builtin_player" self.map["afterdl"] = "after_download" self.map["dc_downloads"] = "double_click_downloads" self.map["notifydone"] = "notify_done" self.map["notifyerror"] = "notify_error" self.map["showsearch"] = "show_search" self.map["globalvideoquality"] = "global_video_quality" self.map_groups = {} self.map_groups["DownloadOpt"] = "DownloadOptions" self.map_groups["Geometry"] = "Window" self.map_groups["%General"] = "General"
def test_is_command(self): """Test that the default player is a command""" from watchvideo.main import get_default_player from watchvideo.utils import is_command self.assertTrue(is_command(get_default_player()))