def test_a2enmod_exception(self):
        mock = MagicMock(side_effect=Exception('error'))
        with patch.dict(deb_apache.__salt__, {'cmd.retcode': mock}):
            self.assertEqual(str(deb_apache.a2enmod('vhost_alias')),
                             'error')

    # 'a2dismod' function tests: 4
This function searches for all "option"-tags and returns a list with all attributes and texts.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/deb_apache_test.py/DebApacheTestCase.test_a2enmod_exception--crossover with--dataset/ETHPy150Open sosy-lab/benchexec/benchexec/util.py/get_list_from_xml