StringIO to six
This commit is contained in:
parent
cab2c7b4ea
commit
b4c7433cc4
23 changed files with 165 additions and 215 deletions
|
|
@ -2,7 +2,7 @@ from __future__ import absolute_import
|
|||
import unittest
|
||||
import mock
|
||||
import sys
|
||||
import StringIO as stringio
|
||||
import six
|
||||
|
||||
from . import loadcli
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ class TestUploadProgressCallBack(unittest.TestCase):
|
|||
self.assertEqual(cli._format_secs(4321), '01:12:01')
|
||||
self.assertEqual(cli._format_secs(4321.567), '01:12:01')
|
||||
|
||||
@mock.patch('sys.stdout', new_callable=stringio.StringIO)
|
||||
@mock.patch('sys.stdout', new_callable=six.StringIO)
|
||||
def test_progress_callback(self, stdout):
|
||||
cli._progress_callback(12300, 234000, 5670, 80, 900)
|
||||
cli._progress_callback(45600, 234000, 5670, 0, 900)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue