[Zope-Checkins] CVS: Zope/lib/python/ZPublisher/tests - testHTTPRequest.py:1.1
Tres Seaver
tseaver@zope.com
Fri, 12 Apr 2002 11:47:27 -0400
Update of /cvs-repository/Zope/lib/python/ZPublisher/tests
In directory cvs.zope.org:/tmp/cvs-serv12776/lib/python/ZPublisher/tests
Added Files:
testHTTPRequest.py
Log Message:
- Resolve Collector #89 by making repr of record eval'able as a dict.
=== Added File Zope/lib/python/ZPublisher/tests/testHTTPRequest.py ===
import unittest
class RecordTests( unittest.TestCase ):
def test_repr( self ):
from ZPublisher.HTTPRequest import record
record = record()
record.a = 1
record.b = 'foo'
r = repr( record )
d = eval( r )
self.assertEqual( d, record.__dict__ )
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(RecordTests, 'test'))
return suite
if __name__ == '__main__':
unittest.main()