[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/tests - testFolderContents.py:1.1.2.1
Christian Theune
ct@gocept.com
Sat, 18 May 2002 06:37:10 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv1412
Added Files:
Tag: ctheune-foldermove-branch
testFolderContents.py
Log Message:
Renamed testFolderContents.py to ../../../../Content/Folder/Views/Browser/tests//testFolderContents.py
=== Added File Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/tests/testFolderContents.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 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.
#
##############################################################################
import unittest
from Zope.App.OFS.Folder.Views.Browser.FolderContents import FolderContents
from Zope.App.OFS.Folder.Folder import Folder
from Zope.App.OFS.Container.Views.Browser.tests.testContents \
import BaseTestContentsBrowserView
class Test(BaseTestContentsBrowserView, unittest.TestCase):
def _TestView__newContext(self):
return Folder()
def _TestView__newView(self, container):
return FolderContents(container)
def testAddServiceManager(self):
folder = Folder()
fc = FolderContents(folder)
fc.addServiceManager()
self.failUnless(folder.hasServiceManager())
self.assertRaises('HasServiceManager', fc.addServiceManager)
def test_suite():
loader = unittest.TestLoader()
return loader.loadTestsFromTestCase( Test )
if __name__=='__main__':
unittest.main()