]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Mock os.makdirs to avoid directory creation in unit tests
authorarmando-migliaccio <amigliaccio@nicira.com>
Wed, 14 Aug 2013 19:05:43 +0000 (12:05 -0700)
committerarmando-migliaccio <amigliaccio@nicira.com>
Wed, 14 Aug 2013 21:05:15 +0000 (14:05 -0700)
commit2786a6cafa6edaf5438a3dacf54b160d8a733e7b
treebfd10c9e188444449b71310db6c5cfb52c183572
parent1bf2724eead422aa9598f89ab96139cee1d22916
Mock os.makdirs to avoid directory creation in unit tests

The directory 'dhcp' under neutron state path should not be
created during unit tests. This patch mocks up calls to
os.makedirs and ensures that methods that rely on it, like
_populate_network_cache, are mocked as well.

Fixes bug #1211952

Change-Id: I83998d4e631b1ebeab90b4c3c0276aa2ffe22c50
neutron/tests/unit/test_dhcp_agent.py