~xubuntu-dev/ubuntu-cdimage/xubuntu-base

« back to all changes in this revision

Viewing changes to lib/cdimage/tests/test_build.py

  • Committer: Iain Lane
  • Date: 2015-06-18 16:00:58 UTC
  • Revision ID: iain.lane@canonical.com-20150618160058-huqv2kmpi3r2zfec
Fix desktop-next system image tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
                os.path.join(output_dir, recovery_img)))
345
345
 
346
346
    @mock.patch("cdimage.osextras.fetch")
347
 
    def test_ubuntu_desktop_next(self, mock_fetch):
348
 
        def fetch_side_effect(config, source, target):
349
 
            if (target.endswith(".manifest") or
350
 
                    target.endswith(".rootfs.tar.gz")):
351
 
                touch(target)
352
 
            else:
353
 
                raise osextras.FetchError
354
 
 
355
 
        mock_fetch.side_effect = fetch_side_effect
356
 
        self.config["PROJECT"] = "ubuntu-desktop-next"
357
 
        self.config["DIST"] = "utopic"
358
 
        self.config["IMAGE_TYPE"] = "daily"
359
 
        self.config["ARCHES"] = "i386"
360
 
        self.capture_logging()
361
 
        build_livecd_base(self.config)
362
 
        self.assertLogEqual([
363
 
            "===== Downloading live filesystem images =====",
364
 
            self.epoch_date,
365
 
        ])
366
 
        output_dir = os.path.join(
367
 
            self.temp_dir, "scratch", "ubuntu-desktop-next", "utopic", "daily",
368
 
            "live")
369
 
        self.assertTrue(os.path.isdir(output_dir))
370
 
        self.assertCountEqual([
371
 
            "i386.manifest",
372
 
            "i386.rootfs.tar.gz",
373
 
        ], os.listdir(output_dir))
374
 
 
375
 
    @mock.patch("cdimage.osextras.fetch")
376
347
    def test_ubuntu_desktop_next_system_image(self, mock_fetch):
377
348
        def fetch_side_effect(config, source, target):
378
349
            if (target.endswith(".manifest") or