mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-22 11:45:15 +00:00
Ported to Python 3.
This commit is contained in:
parent
2f25950944
commit
2dfaa3ac2f
@ -1,3 +1,16 @@
|
||||
"""
|
||||
Ported to Python 3.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
from six import ensure_text
|
||||
|
||||
import os
|
||||
import mock
|
||||
import tempfile
|
||||
@ -122,18 +135,18 @@ class CommandStatus(unittest.TestCase):
|
||||
@mock.patch('sys.stdout', StringIO())
|
||||
def test_no_operations(self, http):
|
||||
values = [
|
||||
StringIO(json.dumps({
|
||||
StringIO(ensure_text(json.dumps({
|
||||
"active": [],
|
||||
"recent": [],
|
||||
})),
|
||||
StringIO(json.dumps({
|
||||
}))),
|
||||
StringIO(ensure_text(json.dumps({
|
||||
"counters": {
|
||||
"bytes_downloaded": 0,
|
||||
},
|
||||
"stats": {
|
||||
"node.uptime": 0,
|
||||
}
|
||||
})),
|
||||
}))),
|
||||
]
|
||||
http.side_effect = lambda *args, **kw: values.pop(0)
|
||||
do_status(self.options)
|
||||
|
@ -142,6 +142,7 @@ PORTED_MODULES = [
|
||||
PORTED_TEST_MODULES = [
|
||||
"allmydata.test.cli.test_alias",
|
||||
"allmydata.test.cli.test_create",
|
||||
"allmydata.test.cli.test_status",
|
||||
|
||||
"allmydata.test.mutable.test_checker",
|
||||
"allmydata.test.mutable.test_datahandle",
|
||||
|
Loading…
x
Reference in New Issue
Block a user