]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
tests: initialize policy in BaseTestCase
authorIhar Hrachyshka <ihrachys@redhat.com>
Fri, 27 Feb 2015 14:19:47 +0000 (15:19 +0100)
committerIhar Hrachyshka <ihrachys@redhat.com>
Fri, 27 Feb 2015 17:11:55 +0000 (18:11 +0100)
commit1349891fce528365e5d1abce95d019ce40275234
tree62092109fb78399115a187faecf8fce97343af2d
parent1404f33b50452d4c0e0ef8c748011ce80303c2fd
tests: initialize policy in BaseTestCase

This is needed to avoid test cases breaking policy file search code from
oslo.config by mocking out stdlib functions from os module like
os.path.isdir or os.path.exists.

This also allows us to remove explicit policy setup from test_api_v2 and
test_policy files.

Note that for test_netns_cleanup, test_ovs_cleanup, and test_config, we
removed test_setup_conf test cases. They test a function that is used in
other test cases only, and hence do not belong to the suite. This allows
us to avoid hacks around those test cases that do not play nice with
global config-file options we set in BaseTestCase.

Change-Id: If14a3c741837193ad104467f0cf4486a6a386e6d
Closes-Bug: #1426369
neutron/tests/base.py
neutron/tests/functional/api/test_policies.py
neutron/tests/unit/test_api_v2.py
neutron/tests/unit/test_config.py
neutron/tests/unit/test_netns_cleanup.py
neutron/tests/unit/test_ovs_cleanup.py
neutron/tests/unit/test_policy.py