Remove ensure_dirs double-patch

test_spawn_radvd called mock.patch on ensure_dirs after the
setup method already patched it out. This causes issues when
mock.patch.stopall() is called because the mocks are stored
as a set and are unwound in a non-deterministic fashion.[1]
So some of the time they will be undone correctly, but others
will leave a monkey-patched in mock, causing the ensure_dir
test to fail.

1. http://bugs.python.org/issue21239

Closes-Bug: #1467908
Change-Id: I321b5fed71dc73bd19b5099311c6f43640726cd4
This commit is contained in:
Kevin Benton 2015-06-25 16:57:30 -07:00
parent 043829d4c3
commit 0be1efad93
1 changed files with 0 additions and 2 deletions

View File

@ -2005,7 +2005,6 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework):
self.external_process_p.stop()
self.ip_cls_p.stop()
ensure_dir = 'neutron.agent.linux.utils.ensure_dir'
get_conf_file_name = 'neutron.agent.linux.utils.get_conf_file_name'
get_pid_file_name = ('neutron.agent.linux.external_process.'
'ProcessManager.get_pid_file_name')
@ -2013,7 +2012,6 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework):
mock.patch(get_conf_file_name).start().return_value = conffile
mock.patch(get_pid_file_name).start().return_value = pidfile
mock.patch(ensure_dir).start()
execute = mock.patch(utils_execute).start()
radvd = ra.DaemonMonitor(