summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2012-02-06 08:40:50 -0500
committerMonty Taylor <mordred@inaugust.com>2012-02-06 08:04:41 -0800
commitbf1d46353edba3f6a46edf2bc96fb9452efeb9aa (patch)
treec29fa4a18f3227cf73716abb4957a594537f2ddf /tests
parent2f9fdc0e9f4cacda51350ecbf3fbf7d5e0d32268 (diff)
downloadoslo-bf1d46353edba3f6a46edf2bc96fb9452efeb9aa.tar.gz
oslo-bf1d46353edba3f6a46edf2bc96fb9452efeb9aa.tar.xz
oslo-bf1d46353edba3f6a46edf2bc96fb9452efeb9aa.zip
Split functions to avoid eventlet import.
Some of these functions are used in setup.py. In a virtualenv based workflow, python setup.py sdist is called to create a tarball which is then installed into the virtualenv. These functions need to be in a separate file so that they can be imported by setup.py without eventlet needing to be installed. Change-Id: I6f7dc9614895b8c91135c62373b98afe55e1fc7d
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
index db1288f..45205e9 100644
--- a/tests/unit/test_utils.py
+++ b/tests/unit/test_utils.py
@@ -23,6 +23,7 @@ import mock
from openstack.common import exception
from openstack.common import utils
+from openstack.common import setup
class UtilsTest(unittest.TestCase):
@@ -111,7 +112,7 @@ class UtilsTest(unittest.TestCase):
string = 'Johnnie T. Hozer'
mapping = {'T.': 'The'}
self.assertEqual('Johnnie The Hozer',
- utils.str_dict_replace(string, mapping))
+ setup.str_dict_replace(string, mapping))
def test_utcnow(self):
utils.set_time_override(mock.sentinel.utcnow)