[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Introspector/tests - testIntrospector.py:1.3.6.2

Deb dhazarika@zeomega.com
Tue, 29 Oct 2002 07:19:35 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Introspector/tests
In directory cvs.zope.org:/tmp/cvs-serv31035

Modified Files:
      Tag: Zope3-Bangalore-TTW-Branch
	testIntrospector.py 
Log Message:
test updated


=== Zope3/lib/python/Zope/App/OFS/Introspector/tests/testIntrospector.py 1.3.6.1 => 1.3.6.2 ===
--- Zope3/lib/python/Zope/App/OFS/Introspector/tests/testIntrospector.py:1.3.6.1	Tue Oct 29 03:46:18 2002
+++ Zope3/lib/python/Zope/App/OFS/Introspector/tests/testIntrospector.py	Tue Oct 29 07:19:34 2002
@@ -20,24 +20,21 @@
 from Interface import Interface
 from unittest import TestCase, TestSuite, main, makeSuite
 from Zope.Testing.CleanUp import CleanUp
-from Zope.Exceptions import DuplicationError, NotFoundError
-from Zope.Publisher.Browser.BrowserRequest import TestRequest
 from Zope.App.OFS.Introspector.Introspector import Introspector
 from TestClass import TestClass, ITestClass, BaseTestClass, I, I2, I3
 
-        
 class Test(CleanUp, TestCase):
     """Test Introspector.
     """
    
     def testIntrospector(self):
-        """ 
-        """
-        ints = Introspector(ITestClass)
+        """Testing introspector"""
+        
+        ints = Introspector(ITestClass)
         self.assertEqual(ints.isInterface(), 1)
         
         ints = Introspector(TestClass())
-        self.assertEqual(ints.isInterface(), 1)
+        self.assertEqual(ints.isInterface(), 0)
         request = {}
         ints.setRequest(request)
         self.assertEqual(ints.getClass(), 'TestClass')
@@ -46,10 +43,10 @@
         self.assertEqual(ints.isInterface(), 0)
         request['PATH_INFO'] = '++module++Zope.App.OFS.Introspector.tests.TestClass.TestClass'
         ints.setRequest(request)
-        self.assertEqual(ints.getClass(), 'TestClass')
+        self.assertEqual(ints.getClass(), 'TestClass')
         self.assertEqual(ints.getBaseClassNames(), ['TestClass.BaseTestClass'])
-        self.assertEqual(ints.getModule(), 'TestClass')
-        self.assertEqual(ints.getDocString(), "This is my stupid doc string")
+        self.assertEqual(ints.getModule(), 'TestClass')
+        self.assertEqual(ints.getDocString(), "This is my stupid doc string")
         self.assertEqual(ints.getInterfaces(), (ITestClass,))
         self.assertEqual(ints.getInterfaceNames(), ['TestClass.ITestClass'])
         self.assertEqual(ints.getExtends(), (BaseTestClass,))
@@ -58,7 +55,7 @@
         self.assertEqual(ints.isInterface(), 1)
         request['PATH_INFO'] = '++module++Zope.App.OFS.Introspector.tests.TestClass.I3'
         ints.setRequest(request)
-        self.assertEqual(ints.getModule(), 'TestClass')
+        self.assertEqual(ints.getModule(), 'TestClass')
         self.assertEqual(ints.getExtends(), (I, I2, ))
         self.assertEqual(ints.getDocString(), "This is dummy doc string")
         Iname = 'I3'
@@ -77,9 +74,10 @@
         attr_desc2 = 'This is a dummy attribute.'
         attributes = [(attr_name1, attr_desc1), (attr_name2, attr_desc2), ]
         details = [Iname, bases, desc, methods, attributes]
+        self.assertEqual(ints.getInterfaceDetails(), details)
+ 
 
-        self.assertEqual(ints.getInterfaceDetails(), details)
-
+        
 def test_suite():
     return TestSuite((makeSuite(Test),))