summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-03-08 09:44:04 +0000
committerGerrit Code Review <review@openstack.org>2014-03-08 09:44:04 +0000
commit2929cc19617362fa5a92b7a9ba18326390424d42 (patch)
treedb491936202ca77da37829b3ab45f6c3fce8fb1c /tests
parent23b1b67128a8fee64bc50441035be76296a10e4d (diff)
parent9b9b647c9ddde538d6b5f3a519d09b801ff82193 (diff)
downloadpython-glanceclient-2929cc19617362fa5a92b7a9ba18326390424d42.tar.gz
Merge "Python 3: do not use __builtin__"
Diffstat (limited to 'tests')
-rw-r--r--tests/test_shell.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_shell.py b/tests/test_shell.py
index 6e9c476..ebe77e0 100644
--- a/tests/test_shell.py
+++ b/tests/test_shell.py
@@ -136,7 +136,7 @@ class ShellCacheSchemaTest(utils.TestCase):
return Args(args)
- @mock.patch('__builtin__.open', new=mock.mock_open(), create=True)
+ @mock.patch('six.moves.builtins.open', new=mock.mock_open(), create=True)
def test_cache_schema_gets_when_not_exists(self):
mocked_path_exists_result_lst = [True, False]
os.path.exists.side_effect = \
@@ -154,7 +154,7 @@ class ShellCacheSchemaTest(utils.TestCase):
self.assertEqual(mock.call().write(json.dumps(self.schema_dict)),
open.mock_calls[2])
- @mock.patch('__builtin__.open', new=mock.mock_open(), create=True)
+ @mock.patch('six.moves.builtins.open', new=mock.mock_open(), create=True)
def test_cache_schema_gets_when_forced(self):
os.path.exists.return_value = True
@@ -170,7 +170,7 @@ class ShellCacheSchemaTest(utils.TestCase):
self.assertEqual(mock.call().write(json.dumps(self.schema_dict)),
open.mock_calls[2])
- @mock.patch('__builtin__.open', new=mock.mock_open(), create=True)
+ @mock.patch('six.moves.builtins.open', new=mock.mock_open(), create=True)
def test_cache_schema_leaves_when_present_not_forced(self):
os.path.exists.return_value = True