def test_set_auth_traps_enabled(self): ''' Test - Manage the sending of authentication traps. ''' mock_value = MagicMock(return_value=True) kwargs = {'status': True} with patch.dict(win_snmp.__salt__, {'reg.set_value': mock_value}): self.assertTrue(win_snmp.set_auth_traps_enabled(**kwargs))
def test_set_auth_traps_enabled(self): """ Test - Manage the sending of authentication traps. """ mock_value = MagicMock(return_value=True) kwargs = {'status': True} with patch.dict(win_snmp.__utils__, {'reg.set_value': mock_value}), \ patch('salt.modules.win_snmp.get_auth_traps_enabled', MagicMock(return_value=True)): self.assertTrue(win_snmp.set_auth_traps_enabled(**kwargs))
def test_set_auth_traps_enabled(self): """ Test - Manage the sending of authentication traps. """ mock_value = MagicMock(return_value=True) kwargs = {"status": True} with patch.dict(win_snmp.__salt__, {"reg.set_value": mock_value}), patch( "salt.modules.win_snmp.get_auth_traps_enabled", MagicMock(return_value=True)): self.assertTrue(win_snmp.set_auth_traps_enabled(**kwargs))