summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com>2018-09-24 16:16:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-24 16:16:19 +0000
commit57cd9bbb75ffe53567c3639621e455e233f74cd2 (patch)
treebc3d4423a805898c4d37527570656db13b30c8c9
parentbd65c5112a6ada9bbb92d4244608582f9237d03a (diff)
parente45d964b627735b37ec177bbdbaf4f11846f194c (diff)
Merge "Fix AttributeError 'MUSIC_API' for tox"
-rw-r--r--conductor/conductor/tests/unit/solver/test_order_lock_service.py6
-rw-r--r--conductor/conductor/tests/unit/solver/test_solver_parser.py6
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'])