diff options
-rw-r--r-- | conductor/conductor/tests/unit/solver/test_order_lock_service.py | 6 | ||||
-rw-r--r-- | conductor/conductor/tests/unit/solver/test_solver_parser.py | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/conductor/conductor/tests/unit/solver/test_order_lock_service.py b/conductor/conductor/tests/unit/solver/test_order_lock_service.py index 0050a1d..141aa6e 100644 --- a/conductor/conductor/tests/unit/solver/test_order_lock_service.py +++ b/conductor/conductor/tests/unit/solver/test_order_lock_service.py @@ -23,11 +23,17 @@ import unittest import uuid from conductor.common.models.order_lock import OrderLock +from conductor.common.music import api from conductor.solver.orders_lock.orders_lock_service import OrdersLockingService +from oslo_config import cfg class TestOrdersLockingService(unittest.TestCase): def setUp(self): + # Initialize music API + music = api.API() + cfg.CONF.set_override('keyspace', 'conductor') + music.keyspace_create(keyspace=cfg.CONF.keyspace) self.order_lock_svc = OrdersLockingService() def test_update_order_status(self): diff --git a/conductor/conductor/tests/unit/solver/test_solver_parser.py b/conductor/conductor/tests/unit/solver/test_solver_parser.py index 94b544f..e5ba50b 100644 --- a/conductor/conductor/tests/unit/solver/test_solver_parser.py +++ b/conductor/conductor/tests/unit/solver/test_solver_parser.py @@ -20,17 +20,23 @@ import mock import unittest +from conductor.common.music import api from conductor.solver.request import demand from conductor.solver.request.parser import Parser as SolverRequestParser from conductor.solver.optimizer.constraints import access_distance as access_dist from conductor.solver.triage_tool.traige_latency import TriageLatency from collections import OrderedDict +from oslo_config import cfg class TestSolverParser(unittest.TestCase): def setUp(self): + # Initialize music API + music = api.API() + cfg.CONF.set_override('keyspace', 'conductor') + music.keyspace_create(keyspace=cfg.CONF.keyspace) self.sp = SolverRequestParser() c1 = access_dist.AccessDistance(_name = 'c1', _type = 't1', _demand_list = ['d1', 'd2']) |