[Zope3-Users] Functional Tests

David Johnson djohnson at jsatech.com
Tue Aug 29 16:51:52 EDT 2006


I decided it's about time to use functional tests.  I've been setting them
up with the following code and I get the 

following error (I've never gotten it to work):

 

import time

import unittest

 

from zope.app.tests.functional import BrowserTestCase

from merchantlink.app import MerchantLink

 

class MerchantLinkTests(BrowserTestCase):

 

    def test_add(self):

        response = self.publish(

            "/+/merchantlink.app.MerchantLink=",

            basic='mgr:mgrpw',

            form={'add_input_name':u'merchantlink',

               'UPDATE_SUBMIT' : 'Add'})

        self.assertEqual(response.getStatus(),302)

        self.assertEqual(response.getHeader('Location'),

             'http://localhost/@@contents.html')

 

        merchantlink = self.getRootFolder()['merchantlink']

 

def test_suite():

    return unittest.TestSuite((

         unittest.makeSuite(MerchantLinkTests),

         ))

 

if __name__=='__main__':

    unittest.main(defaultTest='test_suite')

 

 

Results:

...

IOError: [Errno 2] No such file or directory:
'/home/djohnson/dev/whiteboard/lib/python/merchantlink/browser/tests/ftestin
g.zcml'

 

--

David Johnson

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20060829/3048f440/attachment.htm


More information about the Zope3-users mailing list