1
# -*- coding: utf-8 -*-
3
from time import time, gmtime, strftime
5
from mago.test_suite.brasero import BraseroTestSuite
7
class BraseroBasics(BraseroTestSuite):
9
def burn_path_to_iso(self, path_to_burn=None, iso_tmp_path=None):
10
#Make sure the iso file is not there and if it's remove it.
11
self.check_iso_and_remove(iso_tmp_path)
13
dir_path = os.path.join(self.get_test_dir(), path_to_burn)
14
self.application.burn_path_to_iso(dir_path, iso_tmp_path)
15
#small check to see if the iso was created on the specified directory.
16
if not(os.path.exists(iso_tmp_path)):
17
raise AssertionError, "ISO file was not created."
18
self.check_iso_and_remove(iso_tmp_path)
20
def check_iso_and_remove (self, path=None):
21
if (os.path.exists(path)):
24
except OSError, error:
25
raise AssertionError, ("could not remove %s, %s" % (path, error))
27
if __name__ == "__main__":
28
brasero_test = BraseroBasics()