def test_rendering(self): request = self.create_dummy() builder = self.stub() self.expect(builder.add_file('logo.pdf', data=ANY)) self.replay() layout = LandscapeLayout(self.context, request, builder) latex = layout.render_latex('CONTENT LATEX') self.assertIn('CONTENT LATEX', latex) self.assertIn(layout.get_packages_latex(), latex) self.assertNotIn(r'T direkt ', latex) self.assertNotIn(r'\phantom{foo}\vspace{-2\baselineskip}', latex)
def test_box_sizes_and_positions(self): request = self.create_dummy() builder = self.stub() self.expect(builder.add_file('logo.pdf', data=ANY)) self.replay() layout = LandscapeLayout(self.context, request, builder) layout.show_contact = True layout.show_organisation = True latex = layout.render_latex('LATEX CONTENT') self.assertIn(r'begin{textblock}{58mm\TPHorizModule} ' r'(220mm\TPHorizModule', latex) self.assertIn(r'\begin{textblock}{58mm\TPHorizModule}' r' (220mm\TPHorizModule, 54mm\TPVertModule)', latex)
def test_box_sizes_and_positions(self): request = self.create_dummy() builder = self.stub() self.expect(builder.add_file('logo.pdf', data=ANY)) self.replay() layout = LandscapeLayout(self.context, request, builder) layout.show_contact = True layout.show_organisation = True latex = layout.render_latex('LATEX CONTENT') self.assertIn( r'begin{textblock}{58mm\TPHorizModule} ' r'(220mm\TPHorizModule', latex) self.assertIn( r'\begin{textblock}{58mm\TPHorizModule}' r' (220mm\TPHorizModule, 54mm\TPVertModule)', latex)