[Zope-CVS] CVS: Packages/FunctionalTests/FunctionalTests/tests - test_Result.py:1.2
Tres Seaver
tseaver@zope.com
Tue, 20 May 2003 21:05:07 -0400
Update of /cvs-repository/Packages/FunctionalTests/FunctionalTests/tests
In directory cvs.zope.org:/tmp/cvs-serv3224/FunctionalTests/tests
Modified Files:
test_Result.py
Log Message:
- Refactor over-large Framework.py:
o Split out Request, Result, and Invocation classes / helpers
into separate modlues.
o Begin process of "scarecrowifying" the framework interfaces.
o Clean up docstrings to match newer standards.
o Fix long-broken composite result test, uncovered via refactoring.
=== Packages/FunctionalTests/FunctionalTests/tests/test_Result.py 1.1 => 1.2 ===
--- Packages/FunctionalTests/FunctionalTests/tests/test_Result.py:1.1 Thu Apr 24 17:39:52 2003
+++ Packages/FunctionalTests/FunctionalTests/tests/test_Result.py Tue May 20 21:05:06 2003
@@ -16,9 +16,10 @@
class FauxRequest:
- def __init__( self, name, result, time ):
+ def __init__( self, name, result, time, redirect=None ):
self._name = name
self._result = result
+ self._redirect = redirect
self._time = time
def getName( self ):
@@ -27,6 +28,9 @@
def getExpectedResult( self ):
return self._result
+ def getExpectedRedirect( self ):
+ return self._redirect
+
def getExpectedTime( self ):
return self._time
@@ -150,12 +154,12 @@
, FauxRequest( 'foo', 200, 1.0 )
)
self.assertEquals( len( child.listInvocations() ), 1 )
- self.assertEquals( len( child.listErrors() ), 1 )
+ self.assertEquals( len( child.listErrors() ), 2, child.listErrors() )
self.assertEquals( len( child.listErrors( fatal_only=1 ) ), 1 )
self.assertEquals( len( top.listInvocations() ), 1 )
self.assertEquals( len( top.listInvocations( roll_up=0 ) ), 0 )
- self.assertEquals( len( top.listErrors() ), 1 )
+ self.assertEquals( len( top.listErrors() ), 2 )
self.assertEquals( len( top.listErrors( roll_up=0 ) ), 0 )
self.assertEquals( len( top.listErrors( fatal_only=1 ) ), 1 )
self.assertEquals( len( top.listErrors( fatal_only=1, roll_up=0 ) ), 0 )