From: mpv Date: Fri, 17 Apr 2015 14:50:48 +0000 (+0300) Subject: Update the test due to the API changes X-Git-Tag: V_1.1.0~6^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=50aac4a761e52cbeca7cdc482d90a6fcc2358d2a;p=modules%2Fshaper.git Update the test due to the API changes --- 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 -#=========================================================================