Fix test script to match new code

Fix nullptr bug revealed by bad test script!
This commit is contained in:
WandererFan
2016-10-28 19:33:45 -04:00
committed by Yorik van Havre
parent be8c59e561
commit 4119af2d64
2 changed files with 9 additions and 3 deletions

View File

@@ -47,9 +47,13 @@ class TechDrawTestCases(unittest.TestCase):
self.Anno = self.Doc.addObject('TechDraw::DrawViewAnnotation','TestAnno')
rc = self.Page.addView(self.Anno)
self.Sect = self.Doc.addObject('TechDraw::DrawViewSection','Section')
rc = self.Page.addView(self.Sect)
self.Sect.SectionOrigin = (1.0,1.0,1.0)
self.Sect.Source = self.Box
self.Sect.Direction = FreeCAD.Vector(-1.0,0.0,0.0)
self.Sect.BaseView = self.View
self.Sect.SectionDirection = "Right"
self.Sect.SectionOrigin = FreeCAD.Vector(1.0,1.0,1.0)
self.Sect.SectionNormal = FreeCAD.Vector(-1.0,0.0,0.0)
rc = self.Page.addView(self.Sect)
self.Doc.recompute()
self.failUnless(len(self.Page.Views) == 3)