[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py - more checks in the resources tests

Fred L. Drake, Jr. fdrake at gmail.com
Wed Sep 1 13:56:38 EDT 2004


Log message for revision 27391:
  - more checks in the resources tests
  - clean up some test harness boilerplate
  


Changed:
  U   Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py


-=-
Modified: Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py	2004-09-01 17:29:59 UTC (rev 27390)
+++ Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py	2004-09-01 17:56:38 UTC (rev 27391)
@@ -806,12 +806,15 @@
             ''' % path
             ))
 
-        r = ProxyFactory(getResource('index.html', request))
+        r = getResource('index.html', request)
+        self.assertEquals(r.__class__, FileResource)
+        r = ProxyFactory(r)
         self.assertEqual(r.__name__, "index.html")
 
         # Make sure we can access available attrs and not others
         for n in ('GET', 'HEAD', 'publishTraverse', 'request', '__call__'):
             getattr(r, n)
+        self.assertEqual(r.__name__, "index.html")
 
         self.assertRaises(Exception, getattr, r, '_testData')
 
@@ -1022,8 +1025,7 @@
         self.assert_(isinstance(v, V1))
 
 def test_suite():
-    loader=unittest.TestLoader()
-    return loader.loadTestsFromTestCase(Test)
+    return unittest.makeSuite(Test)
 
 if __name__=='__main__':
-    unittest.TextTestRunner().run(test_suite())
+    unittest.main(defaultTest="test_suite")



More information about the Zope3-Checkins mailing list