Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_pdf.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_pdf.py	(revision 9972)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_pdf.py	(revision 9973)
@@ -3,4 +3,5 @@
 import unittest
 from reportlab.lib import colors
+from reportlab.platypus.flowables import PageBreak
 from waeup.kofa.browser.pdf import (
     format_html, normalize_signature, format_signatures,
@@ -406,4 +407,133 @@
             tables)
 
+
+        data += [PageBreak(), Paragraph(
+            '<br /><br /><font size="14"><font face="Times">horizontal</font>'
+            ' Parameter (with one sig): </b><br />',
+            NORMAL_STYLE)]
+
+        # one signature (default behaviour)
+        tables = get_signature_tables(
+            ['Sig 1'], horizontal=None)
+        data = self.add_tables(
+            data, '<br /><b>One Signature (default, horizontal=None):</b> '
+            '<font face="Times">get_signature_tables(["Signature 1"], '
+            'horizontal=None)</font></b>',
+            tables)
+
+        # one signature (horizontal)
+        tables = get_signature_tables(
+            ['Sig 1'], horizontal=True)
+        data = self.add_tables(
+            data, '<br /><b>One Signature (horizontal=True):</b> '
+            '<font face="Times">get_signature_tables(["Signature 1"], '
+            'horizontal=True)</font></b>',
+            tables)
+
+        # one signature (vertical)
+        tables = get_signature_tables(
+            ['Sig 1'], horizontal=False)
+        data = self.add_tables(
+            data, '<br /><b>One Signature (horizontal=False):</b> '
+            '<font face="Times">get_signature_tables(["Signature 1"], '
+            'horizontal=False)</font></b>',
+            tables)
+
+        data += [Paragraph(
+            '<br /><br /><font size="14"><font face="Times">horizontal</font>'
+            ' Parameter (with two sigs): </b><br />',
+            NORMAL_STYLE)]
+
+        # two signatures (default behaviour)
+        tables = get_signature_tables(
+            ['Signature 1', 'Signature 2'], horizontal=None)
+        data = self.add_tables(
+            data, '<br /><b>Two Signatures (default, horizontal=None):</b> '
+            '<font face="Times">get_signature_tables(["Signature 1",'
+            ' "Signature 2"])</font></b>',
+            tables)
+
+        # two sigs, both horizontal
+        tables = get_signature_tables(
+            ['Sig 1', 'Sig 2'], horizontal=True)
+        data = self.add_tables(
+            data,
+            '<br /><b>Two Signatures (horizontal=True):</b> '
+            '<font face="Times">get_signature_tables('
+            '["Sig 1", "Sig 2"], horizontal=True)</font>',
+            tables)
+
+        # two sigs, both vertical
+        tables = get_signature_tables(
+            ['Sig 1', 'Sig 2'], horizontal=False)
+        data = self.add_tables(
+            data,
+            '<br /><b>Two Signatures (vertical, horizontal=False):</b> '
+            '<font face="Times">get_signature_tables('
+            '["Sig 1", "Sig 2"], horizontal=False)</font>',
+            tables)
+
+
+        data += [PageBreak(), Paragraph(
+            '<br /><br /><font size="14"><font face="Times">max_per_row</font>'
+            ' Parameter: </b><br />',
+            NORMAL_STYLE)]
+
+        # four signature (default)
+        tables = get_signature_tables(
+            ['Sig 1', 'Sig 2', 'Sig 3', 'Sig 4'])
+        data = self.add_tables(
+            data,
+            '<br /><b>Four Sigs (default, max_per_row=3):</b> '
+            '<font face="Times">get_signature_tables('
+            '["Sig 1", "Sig 2", "Sig 3", "Sig 4"])</font>',
+            tables)
+
+        # four signature (max_per_row=1)
+        tables = get_signature_tables(
+            ['Sig 1', 'Sig 2', 'Sig 3', 'Sig 4'], max_per_row=1)
+
+        data = self.add_tables(
+            data,
+            '<br /><b>Four Sigs (max_per_row=1):</b> '
+            '<font face="Times">get_signature_tables('
+            '["Sig 1", "Sig 2", "Sig 3", "Sig 4"], max_per_row=1)</font>'
+            '<br /><i>Please note: mode switches from vertical to '
+            'horizontal automatically</i>',
+            tables)
+
+        # four signature (max_per_row=2)
+        tables = get_signature_tables(
+            ['Sig 1', 'Sig 2', 'Sig 3', 'Sig 4'], max_per_row=2)
+        data = self.add_tables(
+            data,
+            '<br /><b>Four Sigs (max_per_row=2):</b> '
+            '<font face="Times">get_signature_tables('
+            '["Sig 1", "Sig 2", "Sig 3", "Sig 4"], max_per_row=2)</font>',
+            tables)
+
+        data += [PageBreak()]
+
+        # four signature (max_per_row=4)
+        tables = get_signature_tables(
+            ['Sig 1', 'Sig 2', 'Sig 3', 'Sig 4'], max_per_row=4)
+        data = self.add_tables(
+            data,
+            '<b>Four Sigs (max_per_row=4):</b> '
+            '<font face="Times">get_signature_tables('
+            '["Sig 1", "Sig 2", "Sig 3", "Sig 4"], max_per_row=4)</font>',
+            tables)
+
+        # four signature (max_per_row=5)
+        tables = get_signature_tables(
+            ['Sig 1', 'Sig 2', 'Sig 3', 'Sig 4'], max_per_row=5)
+        data = self.add_tables(
+            data,
+            '<br /><b>Four Sigs (max_per_row=5):</b> '
+            '<font face="Times">get_signature_tables('
+            '["Sig 1", "Sig 2", "Sig 3", "Sig 4"], max_per_row=5)</font>',
+            tables)
+
+
         # create PDF from data
         path = draw_sample_pdf(data, title=u"Signatures Sample Sheet")
