changeset 3413:fc0f007111e9

test_Page: testSendPage added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 22 Mar 2008 14:25:21 +0100
parents 91d38a790d8e
children 898a544b8f74
files MoinMoin/_tests/test_Page.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_Page.py	Sat Mar 22 13:54:55 2008 +0100
+++ b/MoinMoin/_tests/test_Page.py	Sat Mar 22 14:25:21 2008 +0100
@@ -51,6 +51,17 @@
         page = Page(self.request, u"FrontPage")
         assert u'WikiSandBox' in page.getPageLinks(self.request)
 
+    def testSendPage(self):
+        page = Page(self.request, u"FrontPage")
+        import StringIO
+        out = StringIO.StringIO()
+        self.request.redirect(out)
+        page.send_page(msg=u'Done', emit_headers=False)
+        result = out.getvalue()
+        self.request.redirect()
+        del out
+        assert result.strip().endswith('</html>')
+        assert result.strip().startswith('<!DOCTYPE HTML PUBLIC')
 
 class TestRootPage:
     def testPageList(self):