]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
tests: don't spread fixtures.TempDir throughout test cases
authorIhar Hrachyshka <ihrachys@redhat.com>
Sat, 17 Jan 2015 12:57:21 +0000 (13:57 +0100)
committerIhar Hrachyshka <ihrachys@redhat.com>
Mon, 26 Jan 2015 12:27:01 +0000 (13:27 +0100)
commit6df0f426735da24eb4a0c1400e26f7626f022778
treeac5efbf4336356bc8de88670b25fe80dd618d649
parent51fcac038954b537d552a4cb37aca1c797c06255
tests: don't spread fixtures.TempDir throughout test cases

Instead, provide self.get_temp_file_path() utility method for tests
interested in creating temporary files.

There also cases when tests are interested in multiple separate
temporary directories. With this in mind, self.get_temp_file_path()
supports root= argument that allows to pass a different temporary
directory fixture than default.

While at it, consolidated cleanup setup for NEC temporary file in single
place.

Change-Id: Ie041edcfde1b16183244a3e6068658308d2a67f5
neutron/tests/base.py
neutron/tests/functional/agent/linux/test_async_process.py
neutron/tests/functional/agent/test_l3_agent.py
neutron/tests/unit/nec/test_nec_plugin.py
neutron/tests/unit/test_agent_linux_utils.py
neutron/tests/unit/test_policy.py