[Zope3-checkins] CVS: Products3/NewsSite/tests - test_newssite.py:1.1

Axel Bringenberg A.Bringenberg@srz-berlin.de
Wed, 26 Mar 2003 05:47:54 -0500


Update of /cvs-repository/Products3/NewsSite/tests
In directory cvs.zope.org:/tmp/cvs-serv20893/tests

Added Files:
	test_newssite.py 
Log Message:
 - added newsite object with configuration and test


=== Added File Products3/NewsSite/tests/test_newssite.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.
#
##############################################################################
"""Test registration views.

$Id: test_newssite.py,v 1.1 2003/03/26 10:47:53 bringi Exp $
"""

import unittest

from zopeproducts.NewsSite.interfaces import INewsSite

#############################################################################
# If your tests change any global registries, then uncomment the
# following import and include CleanUp as a base class of your
# test. It provides a setUp and tearDown that clear global data that
# has registered with the test cleanup framework.  If your class has
# its own setUp or tearDown, make sure you call the CleanUp setUp and
# tearDown from them, or the benefits of using CleanUp will be lost.
# Don't use CleanUp based tests outside the Zope package.

from zope.testing.cleanup import CleanUp # Base class w registry cleanup

#############################################################################

class TestNewsSite(unittest.TestCase):

    def _getTargetClass(self):
        from zopeproducts.NewsSite.newssite import NewsSite

        return NewsSite

    def _makeOne(self):
        return self._getTargetClass()()

    def test_create(self):
        newssite = self._makeOne()
        self.failUnless(INewsSite.isImplementedBy(newssite))

def test_suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TestNewsSite))
    return suite


if __name__ == '__main__':
    unittest.main()