[Zope3-checkins] CVS: Zope3/src/zope/app/wiki/tests -
test_comments.py:1.1 test_wikipage.py:1.2 test_index.py:NONE
test_wikipagesearchtext.py:NONE
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Mar 2 09:25:07 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/wiki/tests
In directory cvs.zope.org:/tmp/cvs-serv21798/src/zope/app/wiki/tests
Modified Files:
test_wikipage.py
Added Files:
test_comments.py
Removed Files:
test_index.py test_wikipagesearchtext.py
Log Message:
Updated Wiki product to follow new API and design patterns. See CHANGES.txt
for detailed information.
=== Added File Zope3/src/zope/app/wiki/tests/test_comments.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""ZWiki Tests
$Id: test_comments.py,v 1.1 2004/03/02 14:25:03 srichter Exp $
"""
import unittest
from zope.app.wiki.wikipage import Comment
from zope.app.wiki.interfaces import IComment
class TestComment(unittest.TestCase):
def setUp(self):
self.comment = Comment()
def test_Interface(self):
self.failUnless(IComment.isImplementedBy(self.comment))
def test_source(self):
self.assertEqual('', self.comment.source)
self.comment.source = 'foo'
self.assertEqual('foo', self.comment.source)
def test_type(self):
self.assertEqual('zope.source.rest', self.comment.type)
self.comment.type = 'foo'
self.assertEqual('foo', self.comment.type)
# XXX: Test title
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestComment),
))
if __name__ == '__main__':
unittest.main()
=== Zope3/src/zope/app/wiki/tests/test_wikipage.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/wiki/tests/test_wikipage.py:1.1 Fri Feb 27 06:07:01 2004
+++ Zope3/src/zope/app/wiki/tests/test_wikipage.py Tue Mar 2 09:25:03 2004
@@ -37,31 +37,11 @@
def test_type(self):
page = self.makeTestObject()
- self.assertEqual('reStructured Text (reST)', page.type)
+ self.assertEqual('zope.source.rest', page.type)
page.type = 'foo'
self.assertEqual('foo', page.type)
- def test_append(self):
- page = self.makeTestObject()
- page.source = 'the source'
- page.append(', more source')
- self.assertEqual('the source, more source', page.source)
- def test_comment(self):
- page = self.makeTestObject()
- page.source = 'the 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),
=== Removed File Zope3/src/zope/app/wiki/tests/test_index.py ===
=== Removed File Zope3/src/zope/app/wiki/tests/test_wikipagesearchtext.py ===
More information about the Zope3-Checkins
mailing list