[Erp5-report] r9204 - /erp5/trunk/utils/ooodoc_server/test_timeout.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 14 22:06:20 CEST 2006
Author: bartek
Date: Mon Aug 14 22:06:17 2006
New Revision: 9204
URL: http://svn.erp5.org?rev=9204&view=rev
Log:
added missing test
Added:
erp5/trunk/utils/ooodoc_server/test_timeout.py
Added: erp5/trunk/utils/ooodoc_server/test_timeout.py
URL: http://svn.erp5.org/erp5/trunk/utils/ooodoc_server/test_timeout.py?rev=9204&view=auto
==============================================================================
--- erp5/trunk/utils/ooodoc_server/test_timeout.py (added)
+++ erp5/trunk/utils/ooodoc_server/test_timeout.py Mon Aug 14 22:06:17 2006
@@ -1,0 +1,30 @@
+#!/usr/bin/python2.4
+
+import sys,base64,unittest
+from xmlrpclib import *
+import config
+
+enc=base64.encodestring
+dec=base64.decodestring
+
+try:
+ f=open('doc/test.odt')
+except IOError:
+ print "you need a doc subdir with appropriate documents"
+ sys.exit(1)
+
+sp=ServerProxy('http://%s:%d' % (config.serverhost,config.port),allow_none=True)
+
+class TestTimeout(unittest.TestCase):
+
+ def testGetMetaWithTimeout(self):
+ # this method should time out and cause a restart of one OOo instance
+ data=open('doc/test_changed.odt').read()
+ res=sp.run_getmetadatatoolong('test_changed.odt',base64.encodestring(data))
+
+
+if __name__=='__main__':
+ tests=(TestTimeout,)
+ for t in tests:
+ suite=unittest.makeSuite(t)
+ unittest.TextTestRunner(verbosity=2).run(suite)
More information about the Erp5-report
mailing list