summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/volume/v2/common.py
diff options
context:
space:
mode:
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)