[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/rotterdam/ merge ftests into tests package, for execution with normal testrunner

Bernd Dorn bernd.dorn at lovelysystems.com
Tue Mar 27 05:23:53 EDT 2007


Log message for revision 73697:
  merge ftests into tests package, for execution with normal testrunner

Changed:
  D   Zope3/trunk/src/zope/app/rotterdam/ftests.py
  A   Zope3/trunk/src/zope/app/rotterdam/tests/test_navtree.py

-=-
Deleted: Zope3/trunk/src/zope/app/rotterdam/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/ftests.py	2007-03-27 09:18:10 UTC (rev 73696)
+++ Zope3/trunk/src/zope/app/rotterdam/ftests.py	2007-03-27 09:23:52 UTC (rev 73697)
@@ -1,83 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2003 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-"""$Id$
-"""
-import unittest
-from xml.dom import minidom
-from zope.app.testing.functional import BrowserTestCase
-from zope.app.rotterdam.testing import RotterdamLayer
-
-class TestNavTree(BrowserTestCase):
-
-    def testnavtree(self):
-        # Add some folders
-        response = self.publish("/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'zope.app.content.Folder', 
-                                      'id':u'First'})
-        self.assertEqual(response.getStatus(), 302)
-        response = self.publish("/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'zope.app.content.Folder', 
-                                      'id':u'S&econd'})
-        self.assertEqual(response.getStatus(), 302)
-        response = self.publish("/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'zope.app.content.Folder', 
-                                      'id':u'Third'})
-        self.assertEqual(response.getStatus(), 302)
-        response = self.publish("/First/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'zope.app.content.Folder', 
-                                      'id':u'Firsts"Folder'})
-        self.assertEqual(response.getStatus(), 302)
-        response = self.publish("/First/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'zope.app.content.Folder', 
-                                      'id':u'somesite'})
-        self.assertEqual(response.getStatus(), 302)
-
-        #add a site manager This will break when site adding is fixed
-        # see above for examples to fix by filling out a form
-        # when further action is required to make a site
-        response = self.publish("/First/somesite/addSiteManager.html",
-                                                basic='mgr:mgrpw')
-        self.assertEqual(response.getStatus(), 302)
-        # /First/FirstsFolder/@@singleBranchTree.xml 
-        # contains those 4 elements above
-        # /@@children.xml 
-        # contains First Second and Third
-        
-        response = self.publish(
-                      "/First/somesite/++etc++site/@@singleBranchTree.xml",
-                                                basic='mgr:mgrpw')
-        self.assertEqual(response.getStatus(), 200)
-
-        tree = minidom.parseString(response.getBody())
-
-        response = self.publish("/@@children.xml", basic='mgr:mgrpw')
-        self.assertEqual(response.getStatus(), 200)
-
-        tree = minidom.parseString(response.getBody())
-
-        response = self.publish("/First/+/action.html", basic='mgr:mgrpw', 
-                                form={'type_name':u'zope.app.content.Folder', 
-                                      'id':u'Firsts2ndFolder'})
-        self.assertEqual(response.getStatus(), 302)
-
-
-def test_suite():
-    suite = unittest.TestSuite()
-    TestNavTree.layer = RotterdamLayer
-    suite.addTest(unittest.makeSuite(TestNavTree))
-    return suite
-
-if __name__=='__main__':
-    unittest.main(defaultTest='test_suite')
-

Copied: Zope3/trunk/src/zope/app/rotterdam/tests/test_navtree.py (from rev 73695, Zope3/trunk/src/zope/app/rotterdam/ftests.py)



More information about the Zope3-Checkins mailing list