@patch('salt.cloud.clouds.opennebula.avail_locations',
           MagicMock(return_value={'my-host': {'name': 'my-host', 'id': 0}}))
    @patch('salt.config.get_cloud_config_value', MagicMock(return_value='my-host'))
    def test_get_location_success(self):
        self.assertEqual(opennebula.get_location('my-host'), 0)
Tests that the image is returned successfully.
dataset/ETHPy150Open saltstack/salt/tests/unit/cloud/clouds/opennebula_test.py/OpenNebulaTestCase.test_get_location_success