From 240009943ae2a1d4ee1e388ec08c1be4d543a44f Mon Sep 17 00:00:00 2001 From: mzn Date: Mon, 1 Oct 2018 10:18:06 +0300 Subject: [PATCH] Fix tests according to new API. --- src/ConstructionAPI/Test/TestPoint.py | 11 +++++------ src/ModelHighAPI/Test/TestRefAttr.py | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) 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()) -- 2.39.2