1
# -*- coding: utf-8 -*-
4
from time import time, gmtime, strftime
6
from mago.test_suite.banshee import Banshee_TestSuite
8
class Banshee_Tests(Banshee_TestSuite):
10
def enable_disable_plugins(self):
11
self.application.banshee_enable_disable_plugins(True)
12
self.application.banshee_enable_disable_plugins(False)
13
self.application.banshee_enable_disable_plugins(True)
15
def add_podcast(self, podcast_url):
16
self.application.banshee_add_podcast(podcast_url)
17
#remove the podcast folder.
18
podcasts_folder = os.getenv('HOME') + '/Podcasts/'
19
if os.path.exists(podcasts_folder):
20
shutil.rmtree(podcasts_folder)
22
def import_extended_m3u(self, extendedm3u):
23
path = os.path.join(self.get_test_dir(), extendedm3u)
24
self.application.banshee_import_playlist(path)
26
def import_extended_pls(self, extendedpls):
27
path = os.path.join(self.get_test_dir(), extendedpls)
28
self.application.banshee_import_playlist(path)
30
def import_simple_m3u(self, simplem3u):
31
path = os.path.join(self.get_test_dir(), simplem3u)
32
self.application.banshee_import_playlist(path)
34
def import_simple_pls(self, simplepls):
35
path = os.path.join(self.get_test_dir(), simplepls)
36
self.application.banshee_import_playlist(path)
38
def test_miro_guide(self):
39
self.application.banshee_miro_guide()
41
def play_file(self, file_path, tmp_path):
42
self.application.create_wav_file(440, file_path)
43
self.application.banshee_play_file(file_path, tmp_path)
45
def create_smart_playlist(self, playlist_name, artist):
46
self.application.banshee_create_smart_playlist(playlist_name, artist)
48
if __name__ == "__main__":
49
banshee_test = Banshee_Tests()