Beispiel #1
0
 def test_create_frame_page(self):
     frame = Frame(
         "Another Frame",
         size=("10cm", "10cm"),
         anchor_type="page",
         anchor_page=1,
         position=("10mm", "10mm"),
         style="Graphics",
     )
     self.assertIn(
         frame.serialize(),
         (
             ('<draw:frame svg:width="10cm" svg:height="10cm" '
              'draw:z-index="0" draw:name="Another Frame" '
              'draw:style-name="Graphics" '
              'svg:x="10mm" svg:y="10mm" '
              'text:anchor-type="page" '
              'text:anchor-page-number="1"/>'),
             ('<draw:frame svg:width="10cm" svg:height="10cm" '
              'draw:z-index="0" draw:name="Another Frame" '
              'text:anchor-type="page" text:anchor-page-number="1" '
              'svg:x="10mm" svg:y="10mm" '
              'draw:style-name="Graphics"/>'),
         ),
     )
Beispiel #2
0
 def test_create_frame(self):
     frame = Frame("A Frame", size=('10cm', '10cm'), style='Graphics')
     expected = ('<draw:frame svg:width="10cm" svg:height="10cm" '
                 'draw:z-index="0" draw:name="A Frame" '
                 'draw:style-name="Graphics"/>')
     self.assertEqual(frame.serialize(), expected)