diff options
author | Bo Wang <bo.wang@easystack.cn> | 2016-02-16 20:04:59 +0800 |
---|---|---|
committer | Bo Wang <bo.wang@easystack.cn> | 2016-02-16 20:04:59 +0800 |
commit | 4136b476667845a9e564aaec6da67e10cec79035 (patch) | |
tree | 7104c62482af06bdf1dd8b79d22a8c70b05915da /contrib | |
parent | 8ef79f95b7b9c19c3695c5c72c718040d25ec982 (diff) | |
download | heat-4136b476667845a9e564aaec6da67e10cec79035.tar.gz |
Use oslo.utils.reflection to extract class name
The oslo.utils.reflection.get_class_name() handles more variations
of where a class name may come from (on) python 2 and python 3.
Its usage allows getting more accurate class names so we'd better use it.
Change-Id: Iff0e109a558d0185f126781369bac216da930bca
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/rackspace/rackspace/tests/test_cloudnetworks.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/rackspace/rackspace/tests/test_cloudnetworks.py b/contrib/rackspace/rackspace/tests/test_cloudnetworks.py index f44e68c60..29c36e238 100644 --- a/contrib/rackspace/rackspace/tests/test_cloudnetworks.py +++ b/contrib/rackspace/rackspace/tests/test_cloudnetworks.py @@ -14,6 +14,7 @@ import uuid import mock +from oslo_utils import reflection import six from heat.common import exception @@ -103,8 +104,9 @@ class CloudNetworkTest(common.HeatTestCase): cloudnetworks.CloudNetwork) def _parse_stack(self): + class_name = reflection.get_class_name(self, fully_qualified=False) self.stack = utils.parse_stack(self._template, - stack_name=self.__class__.__name__) + stack_name=class_name) def _setup_stack(self, mock_client, *args): self.fake_cnw = FakeClient(*args) |