def test_construction_adds_slide_layout_relationship(self): """_Slide(slidelayout) adds relationship slide->slidelayout""" # setup ------------------------ slidelayout = _SlideLayout() slidelayout._shapes = _sldLayout1_shapes() # exercise --------------------- slide = _Slide(slidelayout) # verify length --------------- expected = 1 actual = len(slide._relationships) msg = ("expected len(slide._relationships) of %d, got %d" % (expected, actual)) self.assertEqual(expected, actual, msg) # verify values --------------- rel = slide._relationships[0] expected = ('rId1', RT_SLIDE_LAYOUT, slidelayout) actual = (rel._rId, rel._reltype, rel._target) msg = "expected relationship\n%s\ngot\n%s" % (expected, actual) self.assertEqual(expected, actual, msg)
def setUp(self): self.sld = _Slide()