def test_change_password(self): """ Tests to change users password """ mock = MagicMock(return_value="ABC") with patch.object(drac, "__execute_cmd", mock): self.assertEqual(drac.change_password("username", "password", 1), "ABC") self.assertFalse(drac.change_password("username", "password", False), False)
def test_change_password(self): ''' Tests to change users password ''' mock = MagicMock(return_value='ABC') with patch.object(drac, '__execute_cmd', mock): self.assertEqual(drac.change_password('username', 'password', 1), 'ABC') self.assertFalse(drac.change_password('username', 'password', False), False)