

@istest
def ensures_module_is_installed_and_enabled(self):
    with self.using_stub(AptitudeRole) as aptitude, self.execute_mock() as execute:
        self.role.ensure_mod('foo')
        aptitude.ensure_package_installed.assert_called_with('libapache2-mod-foo')
        execute.assert_called_with('a2enmod foo', sudo=True)
        execute.assertTrue(self.role.must_restart)

dataset/ETHPy150Open python-provy/provy/tests/unit/more/debian/web/test_apache.py ApacheRoleTest.ensures_module_is_installed_and_enabled/VarMisuse@62/105 `self`->`execute`