[Zope-CVS] CVS: Packages/FunctionalTests/FunctionalTests/tests - conformance.py:1.2 test_Result.py:1.4

Tres Seaver tseaver@zope.com
Fri, 13 Jun 2003 23:23:26 -0400


Update of /cvs-repository/Packages/FunctionalTests/FunctionalTests/tests
In directory cvs.zope.org:/tmp/cvs-serv2504/FunctionalTests/tests

Modified Files:
	conformance.py test_Result.py 
Log Message:


  - Add first pass at payload checking, using PluginFunctions.


=== Packages/FunctionalTests/FunctionalTests/tests/conformance.py 1.1 => 1.2 ===
--- Packages/FunctionalTests/FunctionalTests/tests/conformance.py:1.1	Sat May 31 15:10:07 2003
+++ Packages/FunctionalTests/FunctionalTests/tests/conformance.py	Fri Jun 13 23:22:55 2003
@@ -8,7 +8,11 @@
     from Interface.Verify import verifyClass
 except ImportError:
     def verifyClass( iface, klass ):
-        assert iface in klass.__implements__
+        for asserted in klass.__implements__:
+            if asserted is iface or issubclass( iface, asserted ):
+                return 1
+        else:
+            return 0
 
 
 class ConformsToIPluginFunction:


=== Packages/FunctionalTests/FunctionalTests/tests/test_Result.py 1.3 => 1.4 ===
--- Packages/FunctionalTests/FunctionalTests/tests/test_Result.py:1.3	Wed May 21 00:11:24 2003
+++ Packages/FunctionalTests/FunctionalTests/tests/test_Result.py	Fri Jun 13 23:22:55 2003
@@ -16,11 +16,13 @@
 
 class FauxRequest:
 
-    def __init__( self, name, result, time, redirect=None ):
+    def __init__( self, name, result, time
+                , redirect=None, checker=None ):
         self._name      = name
         self._result    = result
         self._redirect  = redirect
         self._time      = time
+        self._checker   = checker
 
     def getName( self ):
         return self._name
@@ -33,6 +35,10 @@
 
     def getExpectedTime( self ):
         return self._time
+
+    def getPayloadChecker( self ):
+        return self._checker
+
 
 MARKER = []
 MARKER2 = []