diff --git a/plugins/org.python.pydev.refactoring/.classpath b/plugins/org.python.pydev.refactoring/.classpath index 2227b76ef4..347bf897b3 100644 --- a/plugins/org.python.pydev.refactoring/.classpath +++ b/plugins/org.python.pydev.refactoring/.classpath @@ -7,7 +7,7 @@ - + diff --git a/plugins/org.python.pydev.refactoring/tests/lib/xstream-1.4.20.jar b/plugins/org.python.pydev.refactoring/tests/lib/xstream-1.4.20.jar new file mode 100644 index 0000000000..a8f7cd8028 Binary files /dev/null and b/plugins/org.python.pydev.refactoring/tests/lib/xstream-1.4.20.jar differ diff --git a/plugins/org.python.pydev.refactoring/tests/lib/xstream-1.4.4.jar b/plugins/org.python.pydev.refactoring/tests/lib/xstream-1.4.4.jar deleted file mode 100644 index dcedd5aadc..0000000000 Binary files a/plugins/org.python.pydev.refactoring/tests/lib/xstream-1.4.4.jar and /dev/null differ diff --git a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/adapter/ModuleAdapterTestCase.java b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/adapter/ModuleAdapterTestCase.java index 8c7dbe5f07..d0774fa0da 100644 --- a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/adapter/ModuleAdapterTestCase.java +++ b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/adapter/ModuleAdapterTestCase.java @@ -14,7 +14,7 @@ * Contributors: * Fabio Zadrozny - initial implementation ******************************************************************************/ -/* +/* * Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler * Copyright (C) 2007 Reto Schuettel, Robin Stocker */ @@ -41,6 +41,10 @@ public void runTest() throws Throwable { ModuleAdapterTestConfig config = null; XStream xstream = new XStream(); + XStream.setupDefaultSecurity(xstream); + xstream.allowTypesByWildcard(new String[] { + "org.python.pydev.**" + }); xstream.alias("config", ModuleAdapterTestConfig.class); ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source), diff --git a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/constructorfield/ConstructorFieldTestCase.java b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/constructorfield/ConstructorFieldTestCase.java index d8e70720f6..16a94338e5 100644 --- a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/constructorfield/ConstructorFieldTestCase.java +++ b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/constructorfield/ConstructorFieldTestCase.java @@ -76,6 +76,10 @@ private MockupConstructorFieldRequestProcessor setupRequestProcessor(MockupConst private MockupConstructorFieldConfig initConfig() { MockupConstructorFieldConfig config = null; XStream xstream = new XStream(); + XStream.setupDefaultSecurity(xstream); + xstream.allowTypesByWildcard(new String[] { + "org.python.pydev.**" + }); xstream.alias("config", MockupConstructorFieldConfig.class); if (data.config.length() > 0) { diff --git a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/generateproperties/GeneratePropertiesTestCase.java b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/generateproperties/GeneratePropertiesTestCase.java index 60777cb600..6667145510 100644 --- a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/generateproperties/GeneratePropertiesTestCase.java +++ b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/generateproperties/GeneratePropertiesTestCase.java @@ -103,6 +103,10 @@ private MockupGeneratePropertiesRequestProcessor setupRequestProcessor(MockupGen private MockupGeneratePropertiesConfig initConfig() { MockupGeneratePropertiesConfig config = null; XStream xstream = new XStream(); + XStream.setupDefaultSecurity(xstream); + xstream.allowTypesByWildcard(new String[] { + "org.python.pydev.**" + }); xstream.alias("config", MockupGeneratePropertiesConfig.class); if (data.config.length() > 0) { diff --git a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/overridemethods/OverrideMethodsTestCase.java b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/overridemethods/OverrideMethodsTestCase.java index 13f9cc963b..ccbb746526 100644 --- a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/overridemethods/OverrideMethodsTestCase.java +++ b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/codegenerator/overridemethods/OverrideMethodsTestCase.java @@ -79,6 +79,10 @@ private MockupOverrideMethodsRequestProcessor setupRequestProcessor(MockupOverri private MockupOverrideMethodsConfig initConfig() { MockupOverrideMethodsConfig config = null; XStream xstream = new XStream(); + XStream.setupDefaultSecurity(xstream); + xstream.allowTypesByWildcard(new String[] { + "org.python.pydev.**" + }); xstream.alias("config", MockupOverrideMethodsConfig.class); if (data.config.length() > 0) { diff --git a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/coderefactoring/extractmethod/ExtractMethodTestCase.java b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/coderefactoring/extractmethod/ExtractMethodTestCase.java index da434c1b6a..fd9b1f884d 100644 --- a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/coderefactoring/extractmethod/ExtractMethodTestCase.java +++ b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/coderefactoring/extractmethod/ExtractMethodTestCase.java @@ -136,6 +136,10 @@ private MockupExtractMethodRequestProcessor setupRequestProcessor(MockupExtractM private MockupExtractMethodConfig initConfig() { MockupExtractMethodConfig config = null; XStream xstream = new XStream(); + XStream.setupDefaultSecurity(xstream); + xstream.allowTypesByWildcard(new String[] { + "org.python.pydev.**" + }); xstream.alias("config", MockupExtractMethodConfig.class); if (data.config.length() > 0) { diff --git a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/visitors/SelectionExtensionTestCase.java b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/visitors/SelectionExtensionTestCase.java index 31a3c21603..146b728ac4 100644 --- a/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/visitors/SelectionExtensionTestCase.java +++ b/plugins/org.python.pydev.refactoring/tests/org/python/pydev/refactoring/tests/visitors/SelectionExtensionTestCase.java @@ -108,6 +108,11 @@ public AdditionalGrammarVersionsToCheck getAdditionalGrammarVersions() throws Mi private MockupSelectionConfig initConfig() { MockupSelectionConfig config = null; XStream xstream = new XStream(); + XStream.setupDefaultSecurity(xstream); + xstream.allowTypesByWildcard(new String[] { + "org.python.pydev.**" + }); + xstream.alias("config", MockupSelectionConfig.class); if (data.config.length() > 0) { diff --git a/plugins/org.python.pydev/tests_completions/org/python/pydev/ast/codecompletion/PythonCompletionWithBuiltinsTest.java b/plugins/org.python.pydev/tests_completions/org/python/pydev/ast/codecompletion/PythonCompletionWithBuiltinsTest.java index bdddd6c105..e8d86c9a16 100644 --- a/plugins/org.python.pydev/tests_completions/org/python/pydev/ast/codecompletion/PythonCompletionWithBuiltinsTest.java +++ b/plugins/org.python.pydev/tests_completions/org/python/pydev/ast/codecompletion/PythonCompletionWithBuiltinsTest.java @@ -159,7 +159,7 @@ public void testRecursion() throws FileNotFoundException, Exception, CompletionR } catch (CompletionRecursionException e) { //that's ok... we're asking for it here... } - requestCompl(f, strDoc, strDoc.length(), -1, new String[] { "args", "with_traceback(tb)" }); + requestCompl(f, strDoc, strDoc.length(), -1, new String[] { "args", "with_traceback(self, tb)" }); } public void testCompleteImportBuiltin() throws BadLocationException, IOException, Exception { @@ -236,12 +236,12 @@ public void testBuiltinsInNamespace1() throws BadLocationException, IOException, public void testBuiltinsInNamespace2() throws BadLocationException, IOException, Exception { String s = "__builtins__.RuntimeError."; - requestCompl(s, s.length(), 2, new String[] { "args", "with_traceback(tb)" }); + requestCompl(s, s.length(), 2, new String[] { "args", "with_traceback(self, tb)" }); } public void testBuiltinsInNamespace2Underline() throws BadLocationException, IOException, Exception { String s = "__builtins__.RuntimeError._"; - requestCompl(s, s.length(), -1, new String[] { "__doc__", "__init__()", "__str__()" }); + requestCompl(s, s.length(), -1, new String[] { "__doc__", "__init__(self)", "__str__(self)" }); } public void testPreferForcedBuiltin() throws BadLocationException, IOException, Exception {