示例#1
0
    def test_chain_with_two_elements(self):
        mox = self.mox
        mox.StubOutWithMock(image_utils, 'set_vhd_parent')

        image_utils.set_vhd_parent('0.vhd', '1.vhd')

        mox.ReplayAll()
        image_utils.fix_vhd_chain(['0.vhd', '1.vhd'])
示例#2
0
    def test_chain_with_two_elements(self):
        mox = self.mox
        mox.StubOutWithMock(image_utils, 'set_vhd_parent')

        image_utils.set_vhd_parent('0.vhd', '1.vhd')

        mox.ReplayAll()
        image_utils.fix_vhd_chain(['0.vhd', '1.vhd'])
示例#3
0
    def test_chain_with_two_elements(self):
        mox = self.mox
        mox.StubOutWithMock(image_utils, "set_vhd_parent")

        image_utils.set_vhd_parent("0.vhd", "1.vhd")

        mox.ReplayAll()
        image_utils.fix_vhd_chain(["0.vhd", "1.vhd"])
示例#4
0
    def test_vhd_util_call(self):
        mox = self.mox
        mox.StubOutWithMock(utils, "execute")

        utils.execute("vhd-util", "modify", "-n", "child", "-p", "parent").AndReturn(("ignored", "ignored"))

        mox.ReplayAll()

        image_utils.set_vhd_parent("child", "parent")
        mox.VerifyAll()
示例#5
0
    def test_vhd_util_call(self):
        mox = self.mox
        mox.StubOutWithMock(utils, 'execute')

        utils.execute('vhd-util', 'modify', '-n', 'child', '-p',
                      'parent').AndReturn(('ignored', 'ignored'))

        mox.ReplayAll()

        image_utils.set_vhd_parent('child', 'parent')
        mox.VerifyAll()
示例#6
0
    def test_vhd_util_call(self):
        mox = self.mox
        mox.StubOutWithMock(utils, 'execute')

        utils.execute(
            'vhd-util', 'modify', '-n', 'child', '-p', 'parent').AndReturn(
                ('ignored', 'ignored'))

        mox.ReplayAll()

        image_utils.set_vhd_parent('child', 'parent')
        mox.VerifyAll()