|
 |
a64660 |
From 590b3fb99635157a3963f67995593b872f92a1c1 Mon Sep 17 00:00:00 2001
|
|
 |
a64660 |
From: shizhihui <zhihui.shi@easystack.cn>
|
|
 |
a64660 |
Date: Fri, 23 Sep 2016 10:57:16 +0800
|
|
 |
a64660 |
Subject: [PATCH 05/21] Replace 'MagicMock' with 'Mock'
|
|
 |
a64660 |
|
|
 |
a64660 |
Change-Id: I24e87a1c341f63929f93d7306782e3e9d6b398fb
|
|
 |
a64660 |
Partial-Bug: #1475722
|
|
 |
a64660 |
---
|
|
 |
a64660 |
heat_cfntools/tests/test_cfn_helper.py | 4 ++--
|
|
 |
a64660 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
 |
a64660 |
|
|
 |
a64660 |
diff --git a/heat_cfntools/tests/test_cfn_helper.py b/heat_cfntools/tests/test_cfn_helper.py
|
|
 |
a64660 |
index d13324a..83bed76 100644
|
|
 |
a64660 |
--- a/heat_cfntools/tests/test_cfn_helper.py
|
|
 |
a64660 |
+++ b/heat_cfntools/tests/test_cfn_helper.py
|
|
 |
a64660 |
@@ -82,7 +82,7 @@ class TestCommandRunner(testtools.TestCase):
|
|
 |
a64660 |
def test_privileges_are_lowered_for_non_root_user(self, mock_geteuid,
|
|
 |
a64660 |
mock_seteuid,
|
|
 |
a64660 |
mock_getpwnam):
|
|
 |
a64660 |
- pw_entry = mock.MagicMock()
|
|
 |
a64660 |
+ pw_entry = mock.Mock()
|
|
 |
a64660 |
pw_entry.pw_uid = 1001
|
|
 |
a64660 |
mock_getpwnam.return_value = pw_entry
|
|
 |
a64660 |
mock_geteuid.return_value = 0
|
|
 |
a64660 |
@@ -114,7 +114,7 @@ class TestCommandRunner(testtools.TestCase):
|
|
 |
a64660 |
def test_privileges_are_restored_for_command_failure(self, mock_geteuid,
|
|
 |
a64660 |
mock_seteuid,
|
|
 |
a64660 |
mock_getpwnam):
|
|
 |
a64660 |
- pw_entry = mock.MagicMock()
|
|
 |
a64660 |
+ pw_entry = mock.Mock()
|
|
 |
a64660 |
pw_entry.pw_uid = 1001
|
|
 |
a64660 |
mock_getpwnam.return_value = pw_entry
|
|
 |
a64660 |
mock_geteuid.return_value = 0
|
|
 |
a64660 |
--
|
|
 |
a64660 |
2.20.1
|
|
 |
a64660 |
|