summaryrefslogtreecommitdiffstats
path: root/tests/unit/scheduler/test_weights.py
diff options
context:
space:
mode:
authorMatthew Sherborne <msherborne@gmail.com>2013-05-03 10:29:45 +1000
committerMatthew Sherborne <msherborne@gmail.com>2013-05-10 22:10:49 +1000
commit1f2aba5f706f882663e770bc8dac031627c91f39 (patch)
treefb0781f5c478bb80e30cf1f1485733462b1ca831 /tests/unit/scheduler/test_weights.py
parent6a4800d8cc36812835dca796895bafec940b2ce5 (diff)
downloadoslo-1f2aba5f706f882663e770bc8dac031627c91f39.tar.gz
oslo-1f2aba5f706f882663e770bc8dac031627c91f39.tar.xz
oslo-1f2aba5f706f882663e770bc8dac031627c91f39.zip
Renames filter to base_filter and weight to base_weight
filter is a python builtin function so importing it pollutes ones name space. It is now renamed to base_filter. We also rename weight to base_weight, just to be consistent in the naming conventions. We add a test for base_filter. Fixes bug 1175829 Change-Id: I46e0fa696d2f39081b5568c701b0a70c54f271ab
Diffstat (limited to 'tests/unit/scheduler/test_weights.py')
-rw-r--r--tests/unit/scheduler/test_weights.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/scheduler/test_weights.py b/tests/unit/scheduler/test_weights.py
index d539ab3..21d3f3e 100644
--- a/tests/unit/scheduler/test_weights.py
+++ b/tests/unit/scheduler/test_weights.py
@@ -16,7 +16,7 @@
Tests For Scheduler weights.
"""
-from openstack.common.scheduler import weight
+from openstack.common.scheduler import base_weight
from tests.unit import fakes
from tests import utils
@@ -24,7 +24,8 @@ from tests import utils
class TestWeightHandler(utils.BaseTestCase):
def test_get_all_classes(self):
namespace = "openstack.common.tests.fakes.weights"
- handler = weight.BaseWeightHandler(weight.BaseWeigher, namespace)
+ handler = base_weight.BaseWeightHandler(
+ base_weight.BaseWeigher, namespace)
classes = handler.get_all_classes()
self.assertTrue(fakes.FakeWeigher1 in classes)
self.assertTrue(fakes.FakeWeigher2 in classes)