Remove unused methond _get_connect_string

We don't use it in anywhere, juse delete it.

Change-Id: Ice7ec357ee19ccbaf9084bcd3bf71237925fb820
This commit is contained in:
ChangBo Guo(gcb) 2017-12-08 13:44:09 +08:00
parent 55792182de
commit 61ec88630e
1 changed files with 0 additions and 18 deletions

View File

@ -62,24 +62,6 @@ LOG = logging.getLogger(__name__)
MIGRATIONS_TIMEOUT = 300
def _get_connect_string(backend, user, passwd, database):
"""Get database connection
Try to get a connection with a very specific set of values, if we get
these then we'll run the tests, otherwise they are skipped
"""
if backend == "postgres":
backend = "postgresql+psycopg2"
elif backend == "mysql":
backend = "mysql+mysqldb"
else:
raise Exception("Unrecognized backend: '%s'" % backend)
return ("%(backend)s://%(user)s:%(passwd)s@localhost/%(database)s"
% {'backend': backend, 'user': user, 'passwd': passwd,
'database': database})
@contextlib.contextmanager
def patch_with_engine(engine):
with mock.patch.object(enginefacade.writer,