[Zope3-checkins] CVS: Zope3/src/zope/modulealias/tests -
__init__.py:1.1.2.1 test_modulealias.py:1.1.2.1
Chris McDonough
chrism at plope.com
Wed Jan 14 09:59:13 EST 2004
Update of /cvs-repository/Zope3/src/zope/modulealias/tests
In directory cvs.zope.org:/tmp/cvs-serv21541/modulealias/tests
Added Files:
Tag: steveachrismcd-securitypolicy-branch
__init__.py test_modulealias.py
Log Message:
Move modulealiases to zope package out of zope.products and include it via zope.app.meta.czml.
=== Added File Zope3/src/zope/modulealias/tests/__init__.py ===
# A package
=== Added File Zope3/src/zope/modulealias/tests/test_modulealias.py ===
import unittest
import sys
from zope.modulealias.metaconfigure import _defineModuleAlias
class Test(unittest.TestCase):
def setUp(self):
self.keys = sys.modules.keys()
def tearDown(self):
keys = sys.modules.keys()
for key in keys:
if key not in self.keys:
del sys.modules[key]
def test_definemodulealias(self):
_defineModuleAlias('unittest_alias', 'unittest')
self.assert_('unittest_alias' in sys.modules.keys())
self.assertEqual(sys.modules['unittest_alias'],sys.modules['unittest'])
def test_suite():
loader=unittest.TestLoader()
return loader.loadTestsFromTestCase(Test)
if __name__=='__main__':
unittest.TextTestRunner().run(test_suite())
More information about the Zope3-Checkins
mailing list