[master 27/30] Rename function attributes (#1014220)
M4rtinK
installerbot-noreply at redhat.com
Mon Jun 1 14:04:44 UTC 2015
From: Martin Kolman <mkolman at redhat.com>
---
tests/pyanaconda_tests/iutil_test.py | 6 +++---
tests/pyanaconda_tests/timezone_test.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/pyanaconda_tests/iutil_test.py b/tests/pyanaconda_tests/iutil_test.py
index b765806..cee03ab 100644
--- a/tests/pyanaconda_tests/iutil_test.py
+++ b/tests/pyanaconda_tests/iutil_test.py
@@ -518,16 +518,16 @@ def vt_activate_test(self):
def raise_os_error(*args, **kwargs):
raise OSError
- _execWithRedirect = iutil.vtActivate.func_globals['execWithRedirect']
+ _execWithRedirect = iutil.vtActivate.__globals__['execWithRedirect']
try:
# chvt does not exist on all platforms
# and the function needs to correctly survie that
- iutil.vtActivate.func_globals['execWithRedirect'] = raise_os_error
+ iutil.vtActivate.__globals__['execWithRedirect'] = raise_os_error
self.assertEqual(iutil.vtActivate(2), False)
finally:
- iutil.vtActivate.func_globals['execWithRedirect'] = _execWithRedirect
+ iutil.vtActivate.__globals__['execWithRedirect'] = _execWithRedirect
def get_deep_attr_test(self):
"""Test getdeepattr."""
diff --git a/tests/pyanaconda_tests/timezone_test.py b/tests/pyanaconda_tests/timezone_test.py
index 00c1520..4d772db 100644
--- a/tests/pyanaconda_tests/timezone_test.py
+++ b/tests/pyanaconda_tests/timezone_test.py
@@ -57,9 +57,9 @@ def setUp(self):
self.iutil_mock = mock.Mock()
# pylint: disable=no-member
- timezone.save_hw_clock.func_globals["arch"] = self.arch_mock
+ timezone.save_hw_clock.__globals__["arch"] = self.arch_mock
# pylint: disable=no-member
- timezone.save_hw_clock.func_globals["iutil"] = self.iutil_mock
+ timezone.save_hw_clock.__globals__["iutil"] = self.iutil_mock
def s390_save_hw_clock_test(self):
"""Check that save_hw_clock does nothing on s390."""
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/8598332197114e71e2ea2273ce5a923de4d207da
More information about the anaconda-patches
mailing list