tests/test-hgweb-no-request-uri.t
changeset 28861 86db5cb55d46
parent 28858 ba7809b053fd
child 29439 c42a3fd5c1fc
--- a/tests/test-hgweb-no-request-uri.t	Sun Apr 10 21:32:08 2016 +0000
+++ b/tests/test-hgweb-no-request-uri.t	Sun Apr 10 20:55:37 2016 +0000
@@ -18,14 +18,17 @@
   > from __future__ import absolute_import
   > import os
   > import sys
-  > from StringIO import StringIO
   > from mercurial.hgweb import (
   >     hgweb,
   >     hgwebdir,
   > )
+  > from mercurial import (
+  >     util,
+  > )
+  > stringio = util.stringio
   > 
-  > errors = StringIO()
-  > input = StringIO()
+  > errors = stringio()
+  > input = stringio()
   > 
   > def startrsp(status, headers):
   >     print '---- STATUS'
@@ -58,22 +61,22 @@
   >     print '---- ERRORS'
   >     print errors.getvalue()
   > 
-  > output = StringIO()
+  > output = stringio()
   > env['PATH_INFO'] = '/'
   > env['QUERY_STRING'] = 'style=atom'
   > process(hgweb('.', name = 'repo'))
   > 
-  > output = StringIO()
+  > output = stringio()
   > env['PATH_INFO'] = '/file/tip/'
   > env['QUERY_STRING'] = 'style=raw'
   > process(hgweb('.', name = 'repo'))
   > 
-  > output = StringIO()
+  > output = stringio()
   > env['PATH_INFO'] = '/'
   > env['QUERY_STRING'] = 'style=raw'
   > process(hgwebdir({'repo': '.'}))
   > 
-  > output = StringIO()
+  > output = stringio()
   > env['PATH_INFO'] = '/repo/file/tip/'
   > env['QUERY_STRING'] = 'style=raw'
   > process(hgwebdir({'repo': '.'}))