From: mzn Date: Mon, 1 Oct 2018 07:18:06 +0000 (+0300) Subject: Fix tests according to new API. X-Git-Tag: CEA_2018-2~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=240009943ae2a1d4ee1e388ec08c1be4d543a44f;p=modules%2Fshaper.git Fix tests according to new API. --- diff --git a/src/ConstructionAPI/Test/TestPoint.py b/src/ConstructionAPI/Test/TestPoint.py index 572e78ab8..30d9b00bb 100644 --- a/src/ConstructionAPI/Test/TestPoint.py +++ b/src/ConstructionAPI/Test/TestPoint.py @@ -45,14 +45,13 @@ class PointTestCase(unittest.TestCase): def test_setValue(self): point = ConstructionAPI.ConstructionAPI_Point(self.feature) - assert(point.x().isInitialized() == False) - assert(point.y().isInitialized() == False) - assert(point.z().isInitialized() == False) + assert(point.point().isInitialized() == False) point.setByXYZ(10, "20", "x + 30") - self.assertEqual(10, point.x().value()) - self.assertEqual("20", point.y().text()) - self.assertEqual("x + 30", point.z().text()) + print(dir(point.point())) + self.assertEqual(10, point.point().x()) + self.assertEqual("20", point.point().textY()) + self.assertEqual("x + 30", point.point().textZ()) if __name__ == "__main__": test_program = unittest.main(exit=False) diff --git a/src/ModelHighAPI/Test/TestRefAttr.py b/src/ModelHighAPI/Test/TestRefAttr.py index 56ed4716f..f2e518628 100644 --- a/src/ModelHighAPI/Test/TestRefAttr.py +++ b/src/ModelHighAPI/Test/TestRefAttr.py @@ -45,8 +45,8 @@ class RefAttrTestCase(FeaturesFixture): ModelHighAPI.ModelHighAPI_RefAttr() def test_create_from_attribute(self): - print(self.feature.x()) - ModelHighAPI.ModelHighAPI_RefAttr(self.feature.x()) + print(self.feature.point()) + ModelHighAPI.ModelHighAPI_RefAttr(self.feature.point()) def test_create_from_object(self): ModelHighAPI.ModelHighAPI_RefAttr(self.feature.feature())