aboutsummaryrefslogtreecommitdiffstats
path: root/python_moondb
diff options
context:
space:
mode:
authorWuKong <rebirthmonkey@gmail.com>2017-12-24 10:47:40 +0100
committerWuKong <rebirthmonkey@gmail.com>2017-12-24 10:47:40 +0100
commit7ae1c898733113f5d5ef0dc247ebc382fbac497a (patch)
treed0c1e813975fe32289c37c5e1091ea9b3a1e8bcc /python_moondb
parent1100c66ce03a059ebe7ece9734e799b49b3a5a9e (diff)
fix a moon_db error
Change-Id: Ibb723412ecd1ea8ac23621f91baeaa0931db8963 Signed-off-by: WuKong <rebirthmonkey@gmail.com>
Diffstat (limited to 'python_moondb')
-rw-r--r--python_moondb/python_moondb/db_manager.py6
-rw-r--r--python_moondb/tests/unit_python/conftest.py2
-rw-r--r--python_moondb/tests/unit_python/test_policies.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/python_moondb/python_moondb/db_manager.py b/python_moondb/python_moondb/db_manager.py
index c305284d..c251afbb 100644
--- a/python_moondb/python_moondb/db_manager.py
+++ b/python_moondb/python_moondb/db_manager.py
@@ -57,15 +57,15 @@ def main(command, logger, engine):
for filename in files:
filename = os.path.basename(filename).replace(".py", "")
o = importlib.import_module(
- "moon_db.migrate_repo.versions.{}".format(filename))
+ "python_moondb.migrate_repo.versions.{}".format(filename))
logger.info("Command is {}".format(command))
if command in ("upgrade", "u", "up"):
logger.info(
- "upgrading moon_db.migrate_repo.versions.{}".format(filename))
+ "upgrading python_moondb.migrate_repo.versions.{}".format(filename))
o.upgrade(engine)
elif command in ("downgrade", "d", "down"):
logger.info(
- "downgrading moon_db.migrate_repo.versions.{}".format(
+ "downgrading python_moondb.migrate_repo.versions.{}".format(
filename))
o.downgrade(engine)
else:
diff --git a/python_moondb/tests/unit_python/conftest.py b/python_moondb/tests/unit_python/conftest.py
index c2e5e579..a1057907 100644
--- a/python_moondb/tests/unit_python/conftest.py
+++ b/python_moondb/tests/unit_python/conftest.py
@@ -136,7 +136,7 @@ def set_consul_and_db(monkeypatch):
mock_components.register_components(m)
mock_keystone.register_keystone(m)
- from moon_db.db_manager import init_engine, main
+ from python_moondb.db_manager import init_engine, main
engine = init_engine()
main("upgrade", logging.getLogger("db_manager"), engine)
yield m
diff --git a/python_moondb/tests/unit_python/test_policies.py b/python_moondb/tests/unit_python/test_policies.py
index 3bd1360e..2d654660 100644
--- a/python_moondb/tests/unit_python/test_policies.py
+++ b/python_moondb/tests/unit_python/test_policies.py
@@ -5,12 +5,12 @@
def get_policies():
- from moon_db.core import PolicyManager
+ from python_moondb.core import PolicyManager
return PolicyManager.get_policies("admin")
def add_policies(value=None):
- from moon_db.core import PolicyManager
+ from python_moondb.core import PolicyManager
if not value:
value = {
"name": "test_policiy",
@@ -22,7 +22,7 @@ def add_policies(value=None):
def delete_policies(uuid=None, name=None):
- from moon_db.core import PolicyManager
+ from python_moondb.core import PolicyManager
if not uuid:
for policy_id, policy_value in get_policies():
if name == policy_value['name']: