def pfrm_fixture(self, request, slide_part_, image_, part_prop_): cxml, is_present = request.param movie = Movie(element(cxml), None) calls, expected_value = [], None part_prop_.return_value = slide_part_ slide_part_.get_image.return_value = image_ if is_present: calls.append(call('rId42')) expected_value = image_ return movie, slide_part_, calls, expected_value
def BaseShapeFactory(shape_elm, parent): """ Return an instance of the appropriate shape proxy class for *shape_elm*. """ tag = shape_elm.tag if tag == qn('p:pic'): videoFiles = shape_elm.xpath('./p:nvPicPr/p:nvPr/a:videoFile') if videoFiles: return Movie(shape_elm, parent) return Picture(shape_elm, parent) shape_cls = { qn('p:cxnSp'): Connector, qn('p:sp'): Shape, qn('p:graphicFrame'): GraphicFrame, }.get(tag, BaseShape) return shape_cls(shape_elm, parent)
def media_type_fixture(self): return Movie(None, None)
def format_fixture(self, _MediaFormat_, media_format_): pic = element('p:pic') parent = movie = Movie(pic, None) return movie, _MediaFormat_, pic, parent, media_format_
def shape_type_fixture(self): return Movie(None, None)