~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/tests/test_imagecache.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-04-04 16:55:52 UTC
  • mfrom: (1.1.53)
  • Revision ID: package-import@ubuntu.com-20120404165552-qqbhkyo6b2hjw6ut
Tags: 2012.1~rc4-0ubuntu1
* New upstream release.
* debian/patches/nova-console-monitor.patch: Disabled.
* debian/nova.conf: Removed console-monitor option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
436
436
            self.assertEquals(image_cache_manager.corrupt_base_files, [])
437
437
 
438
438
    def test_handle_base_image_used(self):
 
439
        self.stubs.Set(virtutils, 'chown', lambda x, y: None)
439
440
        img = '123'
440
441
 
441
442
        with self._make_base_file() as fname:
496
497
            self.assertEquals(image_cache_manager.corrupt_base_files, [])
497
498
 
498
499
    def test_handle_base_image_checksum_fails(self):
 
500
        self.stubs.Set(virtutils, 'chown', lambda x, y: None)
 
501
 
499
502
        img = '123'
500
503
 
501
504
        with self._make_base_file() as fname:
563
566
 
564
567
        self.stubs.Set(os.path, 'exists', lambda x: exists(x))
565
568
 
 
569
        self.stubs.Set(virtutils, 'chown', lambda x, y: None)
 
570
 
566
571
        # We need to stub utime as well
567
572
        orig_utime = os.utime
568
573
        self.stubs.Set(os, 'utime', lambda x, y: None)