Ejemplo n.º 1
0
 def test_create_party_summary_tex(self):
     char = self.new_character()
     tex = make_sheets.create_party_summary_content(party=[char],
                                                    suffix="tex",
                                                    summary_rst="")
     self.assertIn(r"\section*{Party}", tex)
     self.assertIn(char.name, tex)
Ejemplo n.º 2
0
 def test_create_summary_tex(self):
     rst = "The party's create *adventure*."
     tex = make_sheets.create_party_summary_content(party=[],
                                                    suffix="tex",
                                                    summary_rst=rst)
     self.assertIn(r"\section*{Summary}", tex)
     # Check that the RST is parsed
     self.assertIn(r"\emph{adventure}", tex)
Ejemplo n.º 3
0
 def test_create_party_summary_tex_fancy(self):
     char = self.new_character()
     tex = make_sheets.create_party_summary_content(
         party=[char],
         suffix="tex",
         summary_rst="",
         use_dnd_decorations=True)
     self.assertIn(r"\section*{Party}", tex)
     self.assertIn(char.name, tex)
     # Check for passive perception/insight/investigation
     self.assertIn(f'& {char.passive_insight} % Passive insight', tex)
     self.assertIn(f'& {char.passive_perception} % Passive perception', tex)
     self.assertIn(
         f'& {char.passive_investigation} % Passive investigation', tex)
Ejemplo n.º 4
0
 def test_create_party_summary_html(self):
     char = self.new_character()
     html = make_sheets.create_party_summary_content(party=[char],
                                                     suffix="html",
                                                     summary_rst="")
     self.assertIn('<h1 id="gm-party">Party</h1>', html)
     self.assertIn(char.name, html)
     # Check for passive perception/insight/investigation
     self.assertIn('<th>Pass. Per.</th>', html)
     self.assertIn(
         f'<td class="passive-perception">{10+char.perception.modifier}</td>',
         html)
     self.assertIn('<th>Pass. Ins.</th>', html)
     self.assertIn(
         f'<td class="passive-insight">{10+char.insight.modifier}</td>',
         html)
     self.assertIn('<th>Pass. Inv.</th>', html)
     self.assertIn(
         f'<td class="passive-investigation">{10+char.investigation.modifier}</td>',
         html)