[Zope3-checkins] CVS: Zope3/src/zope/app/schema/tests - test_vocabulary.py:1.1.2.1
Fred L. Drake, Jr.
fred@zope.com
Thu, 8 May 2003 13:22:50 -0400
Update of /cvs-repository/Zope3/src/zope/app/schema/tests
In directory cvs.zope.org:/tmp/cvs-serv7547
Added Files:
Tag: schema-vocabulary-branch
test_vocabulary.py
Log Message:
sad little test that makes sure zope.app.schema.vocabulary gets
imported
=== Added File Zope3/src/zope/app/schema/tests/test_vocabulary.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.
#
##############################################################################
"""Unit tests for the global vocabulary service."""
import unittest
from zope.app.schema import vocabulary
class VocabularyServiceTests(unittest.TestCase):
def setUp(self):
vocabulary._clear()
def tearDown(self):
vocabulary._clear()
def test_global_missing_vocabulary(self):
self.assertRaises(LookupError,
vocabulary.vocabularyService.get,
None, "missing-vocabulary")
def test_suite():
return unittest.makeSuite(VocabularyServiceTests)
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")