def test_constructs_slidemaster_for_rt_slidemaster(self): """_Part() returns _SlideMaster for RT_SLIDE_MASTER""" # setup ------------------------ cls = _SlideMaster # exercise --------------------- obj = _Part(RT_SLIDE_MASTER, CT_SLIDE_MASTER) # verify ----------------------- self.assertIsInstance(obj, cls)
def test_constructs_slide_for_rt_slide(self): """_Part() returns _Slide for RT_SLIDE""" # setup ------------------------ cls = _Slide # exercise --------------------- obj = _Part(RT_SLIDE, CT_SLIDE) # verify ----------------------- self.assertIsInstance(obj, cls)
def test_constructs_slidelayout_for_rt_slidelayout(self): """_Part() returns _SlideLayout for RT_SLIDE_LAYOUT""" # setup ------------------------ cls = _SlideLayout # exercise --------------------- obj = _Part(RT_SLIDE_LAYOUT, CT_SLIDE_LAYOUT) # verify ----------------------- self.assertIsInstance(obj, cls)
def test_constructs_presentation_for_rt_officedocument(self): """_Part() returns Presentation for RT_OFFICE_DOCUMENT""" # setup ------------------------ cls = Presentation # exercise --------------------- obj = _Part(RT_OFFICE_DOCUMENT, CT_PRESENTATION) # verify ----------------------- self.assertIsInstance(obj, cls)
def test_contructor_raises_on_invalid_prs_content_type(self): """_Part() raises on invalid presentation content type""" with self.assertRaises(InvalidPackageError): _Part(RT_OFFICE_DOCUMENT, CT_SLIDE_MASTER)