[Zope3-checkins] CVS: zopeproducts/zwiki/tests - test_wikipage.py:1.6

Stephan Richter srichter@cbu.edu
Tue, 8 Apr 2003 22:49:14 -0400


Update of /cvs-repository/zopeproducts/zwiki/tests
In directory cvs.zope.org:/tmp/cvs-serv9806/tests

Modified Files:
	test_wikipage.py 
Log Message:
- Moved renderers to own sub-module. 

- Implemented comments via renderers

- Updated to latest version of StructuredText (now Zope 2 HEAD version)


=== zopeproducts/zwiki/tests/test_wikipage.py 1.5 => 1.6 ===
--- zopeproducts/zwiki/tests/test_wikipage.py:1.5	Tue Apr  8 00:15:05 2003
+++ zopeproducts/zwiki/tests/test_wikipage.py	Tue Apr  8 22:49:13 2003
@@ -51,13 +51,18 @@
     def test_comment(self):
         page = self.makeTestObject()
         page.source = 'the source'
-        page.comment('this is a comment', 'user')
-        self.assertEqual(
-            "the source\n\n" + '-'*20 +
-            "\n\nComment #1 by user\nthis is a comment",
-            page.source)
-
+        self.assertEqual(1, page.__dict__['_WikiPage__comments'])
+        page.comment('\n\nthis is a comment')
+        self.assertEqual("the source\n\nthis is a comment", page.source)
+        self.assertEqual(2, page.__dict__['_WikiPage__comments'])
 
+    def test_getCommentCounter(self):
+        page = self.makeTestObject()
+        self.assertEqual(1, page.getCommentCounter())
+        page.comment('comment')
+        self.assertEqual(2, page.getCommentCounter())
+        
+        
 def test_suite():
     return unittest.TestSuite((
         unittest.makeSuite(Test),