Fixed unit tests.

This commit is contained in:
Markus Lampert
2017-08-26 14:51:23 -07:00
committed by wmayer
parent 401b734006
commit b05a6e1945
2 changed files with 3 additions and 4 deletions

View File

@@ -208,7 +208,7 @@ def Create(name = 'Default Tool', tool=None, toolNumber=1, assignViewProvider=Tr
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", name)
ToolController(obj)
if assignViewProvider:
if FreeCAD.GuiUp and assignViewProvider:
ViewProvider(obj.ViewObject)
if tool is None:
@@ -227,7 +227,7 @@ def FromTemplate(template, assignViewProvider=True):
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", template.get(ToolControllerTemplate.Label))
tc = ToolController(obj)
if assignViewProvider:
if FreeCAD.GuiUp and assignViewProvider:
ViewProvider(obj.ViewObject)
tc.assignTemplate(obj, template)

View File

@@ -112,8 +112,7 @@ class TestDressupDogbone(PathTestBase):
if f.Surface.Axis == FreeCAD.Vector(0,0,1) and f.Orientation == 'Forward':
break
job = doc.addObject("Path::FeatureCompoundPython", "Job")
PathJob.ObjectPathJob(job, cut, None)
job = PathJob.Create('Job', cut, None)
profile = PathProfileFaces.Create('Profile Faces')
profile.Base = (cut, face)