summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/volume/v2/common.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-07-21 00:10:54 +0000
committerGerrit Code Review <review@openstack.org>2017-07-21 00:10:54 +0000
commitd04a7cf92af4548bb259e3f3c871b06aca392b7a (patch)
tree9d8d8c265c64b6520488b4bbb5d93bcbc8090106 /openstackclient/tests/functional/volume/v2/common.py
parent57e7d9fdb33c17a96460655e46ff93bc9d19f807 (diff)
parentf1d32dbe9b6f5f2e47853b9969483fa841e451f4 (diff)
downloadpython-openstackclient-d04a7cf92af4548bb259e3f3c871b06aca392b7a.tar.gz
Merge "Clean up the changes of os.environ in functional tests"
Diffstat (limited to 'openstackclient/tests/functional/volume/v2/common.py')
-rw-r--r--openstackclient/tests/functional/volume/v2/common.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/openstackclient/tests/functional/volume/v2/common.py b/openstackclient/tests/functional/volume/v2/common.py
index 1d14719f..38176714 100644
--- a/openstackclient/tests/functional/volume/v2/common.py
+++ b/openstackclient/tests/functional/volume/v2/common.py
@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import os
+import fixtures
from openstackclient.tests.functional.volume import base
@@ -18,6 +18,9 @@ from openstackclient.tests.functional.volume import base
class BaseVolumeTests(base.BaseVolumeTests):
"""Base class for Volume functional tests. """
- @classmethod
- def setUpClass(cls):
- os.environ['OS_VOLUME_API_VERSION'] = '2'
+ def setUp(self):
+ super(BaseVolumeTests, self).setUp()
+ ver_fixture = fixtures.EnvironmentVariable(
+ 'OS_VOLUME_API_VERSION', '2'
+ )
+ self.useFixture(ver_fixture)