~ubuntu-branches/ubuntu/vivid/mago/vivid

« back to all changes in this revision

Viewing changes to banshee/banshee_tests.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-02-08 13:32:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110208133213-m1og7ey0m990chg6
Tags: 0.3+bzr20-0ubuntu1
* debian/rules:
  - updated to debhelper 7
  - use dh_python2 instead of python-central
* debian/pycompat:
  - removed, no longer needed
* debian/control:
  - dropped cdbs and python-central dependencies
* bzr snapshot of the current trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
import os
3
 
import shutil
4
 
from time import time, gmtime, strftime
5
 
 
6
 
from mago.test_suite.banshee import Banshee_TestSuite 
7
 
 
8
 
class Banshee_Tests(Banshee_TestSuite):
9
 
 
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)
14
 
 
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)
21
 
    
22
 
    def import_extended_m3u(self, extendedm3u):
23
 
        path = os.path.join(self.get_test_dir(), extendedm3u)
24
 
        self.application.banshee_import_playlist(path)
25
 
 
26
 
    def import_extended_pls(self, extendedpls):
27
 
        path = os.path.join(self.get_test_dir(), extendedpls)
28
 
        self.application.banshee_import_playlist(path)
29
 
    
30
 
    def import_simple_m3u(self, simplem3u):
31
 
        path = os.path.join(self.get_test_dir(), simplem3u)
32
 
        self.application.banshee_import_playlist(path)
33
 
        
34
 
    def import_simple_pls(self, simplepls):
35
 
        path = os.path.join(self.get_test_dir(), simplepls)
36
 
        self.application.banshee_import_playlist(path)
37
 
 
38
 
    def test_miro_guide(self):
39
 
        self.application.banshee_miro_guide()
40
 
 
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)
44
 
 
45
 
    def create_smart_playlist(self, playlist_name, artist):
46
 
        self.application.banshee_create_smart_playlist(playlist_name, artist)
47
 
 
48
 
if __name__ == "__main__":
49
 
    banshee_test =  Banshee_Tests()
50
 
    banshee_test.run()