mock.sentinel.snap

Here are the examples of the python api mock.sentinel.snap taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: os-brick Source File: test_vmware.py
    @ddt.data((None, False), ([mock.sentinel.snap], True))
    @ddt.unpack
    def test_snapshot_exists(self, snap_list, exp_return_value):
        snapshot = mock.Mock(rootSnapshotList=snap_list)
        session = mock.Mock()
        session.invoke_api.return_value = snapshot

        backing = mock.sentinel.backing
        ret = self._connector._snapshot_exists(session, backing)

        self.assertEqual(exp_return_value, ret)
        session.invoke_api.assert_called_once_with(
            vim_util, 'get_object_property', session.vim, backing, 'snapshot')