From 50aac4a761e52cbeca7cdc482d90a6fcc2358d2a Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 17 Apr 2015 17:50:48 +0300 Subject: [PATCH] Update the test due to the API changes --- src/ModelAPI/Test/TestDocument.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/ModelAPI/Test/TestDocument.py b/src/ModelAPI/Test/TestDocument.py index d3693974e..e0f7da4be 100644 --- a/src/ModelAPI/Test/TestDocument.py +++ b/src/ModelAPI/Test/TestDocument.py @@ -62,7 +62,7 @@ assert(aPart.size("Features") == 1) # Duplicate the document assert(aSession.moduleDocument().size("Parts") == 1) aSession.startOperation() -aSession.moduleDocument().addFeature("Duplicate") +aPart.addFeature("Duplicate") aSession.finishOperation() assert(aSession.moduleDocument().size("Parts") == 2) aCopyOfPart = aSession.activeDocument() @@ -75,7 +75,7 @@ assert(aCopyOfPart != aPart) #========================================================================= assert(aSession.moduleDocument().size("Parts") == 2) aSession.startOperation() -aSession.moduleDocument().addFeature("Remove") +aPart.addFeature("Remove") aSession.finishOperation() assert(aSession.moduleDocument().size("Parts") == 1) assert(aSession.activeDocument().id() == aSession.moduleDocument().id()) @@ -83,23 +83,7 @@ assert(aSession.activeDocument().id() == aSession.moduleDocument().id()) aSession.startOperation() aDoc1 = aSession.document("Part_1") aSession.setActiveDocument(aDoc1, False) -aSession.moduleDocument().addFeature("Remove") +aDoc1.addFeature("Remove") aSession.finishOperation() assert(aSession.moduleDocument().size("Parts") == 0) assert(aSession.activeDocument()) -#========================================================================= -# Trying to duplicate/remove the root -#========================================================================= -aSession.startOperation() -aSession.moduleDocument().addFeature("Duplicate") -aSession.finishOperation() -assert(aSession.activeDocument().id() == aSession.moduleDocument().id()) -assert(aSession.moduleDocument().size("Parts") == 0) -aSession.startOperation() -aSession.moduleDocument().addFeature("Remove") -aSession.finishOperation() -assert(aSession.activeDocument().id() == aSession.moduleDocument().id()) -assert(aSession.moduleDocument().size("Parts") == 0) -#========================================================================= -# End of test -#========================================================================= -- 2.39.2