[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI/tests - testProvideClass.py:1.1.2.1 testAddables.py:NONE
Tres Seaver
tseaver@zope.com
Tue, 20 Nov 2001 17:21:23 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI/tests
In directory cvs.zope.org:/tmp/cvs-serv27345/Zope/App/ZMI/tests
Added Files:
Tag: Zope-3x-branch
testProvideClass.py
Removed Files:
Tag: Zope-3x-branch
testAddables.py
Log Message:
- Update factory tests to accomodate change to 'createObject' API.
- Update other tests which depend on 'createObject.
=== Added File Zope3/lib/python/Zope/App/ZMI/tests/testProvideClass.py ===
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (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.
""" ZMI unit tests """
import unittest, sys, Interface
class MyAddableObject:
pass
class ProvideClassTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
from Zope.App.ZMI.Addable import _clear
_clear()
from Zope.ComponentArchitecture import _clear
_clear()
def testProvideClass(self):
from Zope.ComponentArchitecture.hooks import createObject
from Zope.App.ZMI import provideClass
provideClass('My.Test.Addable', MyAddableObject, None, 'Testing')
object = createObject(None,'My.Test.Addable')
self.assert_(isinstance(object, MyAddableObject))
def test_suite():
loader = unittest.TestLoader()
return loader.loadTestsFromTestCase(ProvideClassTest)
if __name__ == '__main__':
unittest.TextTestRunner().run(test_suite())
=== Removed File Zope3/lib/python/Zope/App/ZMI/tests/testAddables.py ===