[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture/tests - testSkins.py:1.1.2.5

Andreas Jung andreas@digicool.com
Thu, 10 Jan 2002 16:01:39 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture/tests
In directory cvs.zope.org:/tmp/cvs-serv6963

Modified Files:
      Tag: Zope-3x-branch
	testSkins.py 
Log Message:
added test for proper lookup failure handling 


=== Zope3/lib/python/Zope/ComponentArchitecture/tests/testSkins.py 1.1.2.4 => 1.1.2.5 ===
 
         provideView(I1, 'test', I2, C1)
-        self.assertEqual(getRequestView(O(), 'test', \
+        self.assertEqual(getRequestView(O(), 'test', 
             Request(I2,'') ).__class__, C1) 
         defineSkin('foo', ('foo', ''))
-        self.assertEqual(getRequestView(O(), 'test', \
+
+        self.assertEqual(getRequestView(O(), 'test', 
             Request(I2, 'foo')).__class__, C1) 
         provideView(None, 'test', I2, C2)
-        self.assertEqual(getRequestView(O(), 'test', \
+
+        self.assertEqual(getRequestView(O(), 'test', 
             Request(I2, 'foo')).__class__, C1) 
         provideView(None, 'test', I2, C2, layer='foo')
-        self.assertEqual(getRequestView(O(), 'test', \
+
+        self.assertEqual(getRequestView(O(), 'test', 
             Request(I2, 'foo')).__class__, C2) 
         provideView(I1, 'test', I2, C3, layer='foo')
-        self.assertEqual(getRequestView(O(), 'test', \
+
+        self.assertEqual(getRequestView(O(), 'test', 
             Request(I2, 'foo')).__class__, C3) 
 
+        self.assertRaises(ComponentLookupError,  
+            getRequestView, O(), 'test2', Request(I2, 'foo'))
+
+        self.assertEqual(getRequestView(O(), 'test2', 
+            Request(I2, 'foo'), None), None)