[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/tests - testLoadedFolderContents.py:1.1.2.1

Christian Theune ct@gocept.com
Sat, 18 May 2002 06:37:18 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv1436

Added Files:
      Tag: ctheune-foldermove-branch
	testLoadedFolderContents.py 
Log Message:
Renamed testLoadedFolderContents.py to ../../../../Content/Folder/Views/Browser/tests//testLoadedFolderContents.py

=== Added File Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/tests/testLoadedFolderContents.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.LoadedFolderContents import \
     LoadedFolderContents
from Zope.App.OFS.Folder.LoadedFolder import LoadedFolder
from Zope.App.OFS.Container.Views.Browser.tests.testContents \
     import BaseTestContentsBrowserView

class Test(BaseTestContentsBrowserView, unittest.TestCase):

    def _TestView__newContext(self):
        return LoadedFolder()

    def _TestView__newView(self, container):
        return LoadedFolderContents(container)

    def testAddServiceManager(self):
        folder = LoadedFolder()
        fc = LoadedFolderContents(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()