Exemple #1
0
 def test_print_html42(self):
     raw = "[[answer : my answer";
     expected_output = '<div style="margin-top:5px;margin-bottom:5px;"><a class="button" href="#"  data-target="##">answer </a></div><div class="response" id="response_##"><ul>\n my answer</div>\n</ul>';
     output = PageFormatter(raw).print_html()
     target_id = ""
     target_entry = re.search('data-target="(.*?)"', output, re.IGNORECASE|re.DOTALL)
     if target_entry:
         target_id = target_entry.group(1)
         output = output.replace(target_id, "##")
     assert_equal(expected_output, output)
Exemple #2
0
 def test_print_html41(self):
     raw = "[[answer (code=123456):my answer]]";
     expected_output = '<div style="margin-top:5px;margin-bottom:5px;"><a class="button" href="#" data-password="******" data-target="##">answer </a></div><form class="unlock" style="display:none;" id="form_##"><input type="text"><input type="submit" data-target="##" value="" data-password="******"></form><div class="response" id="response_##">XEsTVVtFRldB</div>\n';
     output = PageFormatter(raw).print_html()
     target_id = ""
     target_entry = re.search('data-target="(.*?)"', output, re.IGNORECASE|re.DOTALL)
     if target_entry:
         target_id = target_entry.group(1)
         output = output.replace(target_id, "##")
     assert_equal(expected_output, output)
Exemple #3
0
 def test_print_html42(self):
     raw = "[[answer : my answer"
     expected_output = '<div style="margin-top:5px;margin-bottom:5px;"><a class="button" href="#"  data-target="##">answer </a></div><div class="response" id="response_##"><ul>\n my answer</div>\n</ul>'
     output = PageFormatter(raw).print_html()
     target_id = ""
     target_entry = re.search('data-target="(.*?)"', output,
                              re.IGNORECASE | re.DOTALL)
     if target_entry:
         target_id = target_entry.group(1)
         output = output.replace(target_id, "##")
     assert_equal(expected_output, output)
Exemple #4
0
 def test_print_html41(self):
     raw = "[[answer (code=123456):my answer]]"
     expected_output = '<div style="margin-top:5px;margin-bottom:5px;"><a class="button" href="#" data-password="******" data-target="##">answer </a></div><form class="unlock" style="display:none;" id="form_##"><input type="text"><input type="submit" data-target="##" value="" data-password="******"></form><div class="response" id="response_##">XEsTVVtFRldB</div>\n'
     output = PageFormatter(raw).print_html()
     target_id = ""
     target_entry = re.search('data-target="(.*?)"', output,
                              re.IGNORECASE | re.DOTALL)
     if target_entry:
         target_id = target_entry.group(1)
         output = output.replace(target_id, "##")
     assert_equal(expected_output, output)