#NEWLINE# def test_assemble_xml_file_with_url( self ) : #NEWLINE# #INDENT# 'Test writing a drawing with no cell data.' #NEWLINE# self . maxDiff = None #NEWLINE# fh = StringIO ( ) #NEWLINE# drawing = Drawing ( ) #NEWLINE# drawing . _set_filehandle ( fh ) #NEWLINE# drawing = Drawing ( ) #NEWLINE# drawing . _set_filehandle ( fh ) #NEWLINE# tip = 'this is a tooltip' #NEWLINE# url = 'https://www.github.com' #NEWLINE# drawing . _add_drawing_object ( [ 2 , 2 , 1 , 0 , 0 , 3 , 6 , 533257 , 190357 , 1219200 , 190500 , 1142857 , 1142857 , 'republic.png' , None , url , tip , None ] ) #NEWLINE# drawing . embedded = 1 #NEWLINE# drawing . _assemble_xml_file ( ) #NEWLINE# exp = _xml_to_list ( '\n                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n                <xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">\n                  <xdr:twoCellAnchor editAs="oneCell">\n                    <xdr:from>\n                      <xdr:col>2</xdr:col>\n                      <xdr:colOff>0</xdr:colOff>\n                      <xdr:row>1</xdr:row>\n                      <xdr:rowOff>0</xdr:rowOff>\n                    </xdr:from>\n                    <xdr:to>\n                      <xdr:col>3</xdr:col>\n                      <xdr:colOff>533257</xdr:colOff>\n                      <xdr:row>6</xdr:row>\n                      <xdr:rowOff>190357</xdr:rowOff>\n                    </xdr:to>\n                    <xdr:pic>\n                    <xdr:nvPicPr>\n                        <xdr:cNvPr id="2" name="Picture 1" descr="republic.png">\n                          <a:hlinkClick xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId1" tooltip="this is a tooltip"/>\n                        </xdr:cNvPr>\n                        <xdr:cNvPicPr>\n                            <a:picLocks noChangeAspect="1"/>\n                        </xdr:cNvPicPr>\n                    </xdr:nvPicPr>\n                    <xdr:blipFill>\n                        <a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId2"/>\n                        <a:stretch>\n                            <a:fillRect/>\n                        </a:stretch>\n                    </xdr:blipFill>\n                      <xdr:spPr>\n                        <a:xfrm>\n                          <a:off x="1219200" y="190500"/>\n                          <a:ext cx="1142857" cy="1142857"/>\n                        </a:xfrm>\n                        <a:prstGeom prst="rect">\n                          <a:avLst/>\n                        </a:prstGeom>\n                      </xdr:spPr>\n                    </xdr:pic>\n                    <xdr:clientData/>\n                  </xdr:twoCellAnchor>\n                </xdr:wsDr>\n                ' ) #NEWLINE# got = _xml_to_list ( fh . getvalue ( ) ) #NEWLINE# self . assertEqual ( got , exp )