diff options
author | Takashi Natsume <takanattie@gmail.com> | 2020-05-12 14:52:10 +0000 |
---|---|---|
committer | Takashi Natsume <takanattie@gmail.com> | 2020-11-07 03:25:02 +0000 |
commit | 1d0a0e8c2068c01366575bb989f15c2fd8962154 (patch) | |
tree | 00b00c39ff7782108ccaafb309fefa08ad9fd71f /nova/tests/unit/test_utils.py | |
parent | 4ac4a04d1843b0450e8d6d80189ce3e85253dcd0 (diff) | |
download | nova-1d0a0e8c2068c01366575bb989f15c2fd8962154.tar.gz |
Remove six.moves
Replace the following items with Python 3 style code.
- six.moves.configparser
- six.moves.StringIO
- six.moves.cStringIO
- six.moves.urllib
- six.moves.builtins
- six.moves.range
- six.moves.xmlrpc_client
- six.moves.http_client
- six.moves.http_cookies
- six.moves.queue
- six.moves.zip
- six.moves.reload_module
- six.StringIO
- six.BytesIO
Subsequent patches will replace other six usages.
Change-Id: Ib2c406327fef2fb4868d8050fc476a7d17706e23
Implements: blueprint six-removal
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Diffstat (limited to 'nova/tests/unit/test_utils.py')
-rw-r--r-- | nova/tests/unit/test_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/unit/test_utils.py b/nova/tests/unit/test_utils.py index e9930fcb7a..ae75b01e54 100644 --- a/nova/tests/unit/test_utils.py +++ b/nova/tests/unit/test_utils.py @@ -260,7 +260,7 @@ class TestCachedFile(test.NoDBTestCase): fake_contents = "lorem ipsum" - with mock.patch('six.moves.builtins.open', + with mock.patch('builtins.open', mock.mock_open(read_data=fake_contents)): fresh, data = utils.read_cached_file("/this/is/a/fake") |