Salome HOME
Adjust unit tests to new behavior of SketchBuilder
[modules/shaper.git] / src / ModelAPI / Test / Test1064.py
index c73dfd17d9633503c56894647420408ff1975c1f..14ad14b444bf8036e8c0e32f934e9951acac4710 100644 (file)
@@ -1,7 +1,7 @@
 """
       Test1064.py
       Unit test for testing the Part sub-shapes naming, described in the issue 1064
-      
+
 """
 #=========================================================================
 # Initialization of the test
@@ -68,18 +68,20 @@ aSession.finishOperation()
 #=========================================================================
 # Make a plane in PartSet on lateral face of the Extrusion
 #=========================================================================
-aSession.startOperation()
+aSession.startOperation("Make Plane")
 aSession.setActiveDocument(aPartSet)
 aPlane = aPartSet.addFeature("Plane")
-aPlane.string("CreationMethod").setValue("PlaneByFaceAndDistance")
-aPlane.real("distance").setValue(0)
-aPlane.selection("planeFace").selectSubShape("face", "Part_1/Extrusion_1_1/LateralFace_3")
+aPlane.string("creation_method").setValue("by_other_plane")
+aPlane.string("by_other_plane_option").setValue("by_distance_from_other")
+aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_1")
+aPlane.real("distance").setValue(0.001)
+aPlane.boolean("reverse").setValue(False)
 aSession.finishOperation()
 
 #=========================================================================
 # Update the sketch edges in order to update the plane on the lateral face automatically
 #=========================================================================
-aSession.startOperation()
+aSession.startOperation("UpdateLine")
 geomDataAPI_Point2D(aLine1.attribute("EndPoint")).setValue(400, 0)
 geomDataAPI_Point2D(aLine2.attribute("StartPoint")).setValue(400, 0)
 aSession.finishOperation()
@@ -103,3 +105,6 @@ assert(aPln.direction().z() == 0.)
 #=========================================================================
 # End of test
 #=========================================================================
+
+from salome.shaper import model
+assert(model.checkPythonDump())