Beispiel #1
0
 def create_fake_iso(self, output_dir):
     """ Create a fake ISO file, without genisoimage """
     iso = Iso([])
     f = output_dir.join('test.iso')
     f.write('ISOCONTENTS')
     iso.output = str(f)
     iso.make_sha256sum()
     return iso
Beispiel #2
0
    def create_real_iso(self, output_dir):
        """ Create a "real" ISO file, using make_iso() (ie genisoimage) """
        # simple contents
        compose_dir = output_dir.mkdir('my-test-contents')
        f = compose_dir.join('contents.txt')
        f.write('This text file will be on our ISO')

        iso = Iso([])
        argv = ['merfi', str(output_dir.join('my-test-contents'))]
        iso.parse_args(argv)
        iso.make_iso()
        iso.make_sha256sum()
        return iso