diff options
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/fake_libvirt_utils.py | 2 | ||||
| -rw-r--r-- | nova/tests/test_libvirt.py | 2 | ||||
| -rw-r--r-- | nova/tests/test_utils.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/fake_libvirt_utils.py b/nova/tests/fake_libvirt_utils.py index 1196e8576..aa613f35d 100644 --- a/nova/tests/fake_libvirt_utils.py +++ b/nova/tests/fake_libvirt_utils.py @@ -104,7 +104,7 @@ def file_open(path, mode=None): def load_file(path): if os.path.exists(path): - with open(path, 'r+') as fp: + with open(path, 'r') as fp: return fp.read() else: return '' diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 4e6e1ec48..10ed64429 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -1989,7 +1989,7 @@ class LibvirtConnTestCase(test.TestCase): return FakeVirtDomain(fake_dom_xml) def _fake_flush(self, fake_pty): - with open(fake_pty, 'r+') as fp: + with open(fake_pty, 'r') as fp: return fp.read() self.create_fake_libvirt_mock() diff --git a/nova/tests/test_utils.py b/nova/tests/test_utils.py index eb7fce1e0..7513ca12e 100644 --- a/nova/tests/test_utils.py +++ b/nova/tests/test_utils.py @@ -73,7 +73,7 @@ exit 1 tmpfilename, tmpfilename2, attempts=10, process_input='foo', delay_on_retry=False) - fp = open(tmpfilename2, 'r+') + fp = open(tmpfilename2, 'r') runs = fp.read() fp.close() self.assertNotEquals(runs.strip(), 'failure', 'stdin did not ' |
