[Product-Developers] 'module' object has no attribute 'test_suite' error in my TEST

Brandon Swendsen bswendsen at tnavc.org
Thu May 29 15:51:32 UTC 2008


I'm having some trouble with my unit tests.  I am following along in
Martin Aspeli's book "Professional Plone Development", more
specifically, Chapter 5 page 73. I have followed to the best of my
knowledge exactly how the book explained, but I'm getting an error when
I ".\bin\instance test -s navc.policy" Here's the error:

 

                Module: navc.policy.tests

 

                AttributeError: 'module' object has no attribute
'test_suite'

 

I've included my code for test_setup.py

------------------------------------------------------------------------
--------------------------------------------------------------------

------------------------------------------------------------------------
--------------------------------------------------------------------

import unittest

from navc.policy.tests.base import NavcPolicyTestCase

 

class TestSetup(NavcPolicyTestCase):

    

    def test_portal_title(self):

        self.assertEquals("NAVC Test Site",
self.portal.getProperty('title'))

        

    def test_portal_description(self):

        self.assertEquals("Welcome to the NAVC Test Site",
self.portal.getProperty('description'))

 

def test_suite():

    suite = unittest.TestSuite()

    suite.addTest(unittest.makeSuite(TestSetup))

    return suite

------------------------------------------------------------------------
--------------------------------------------------------------------

------------------------------------------------------------------------
--------------------------------------------------------------------

 

 

Thank you,

Brandon Swendsen

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20080529/2e15c55f/attachment-0001.html>


More information about the Product-Developers mailing list