From bcd211ab6dfb899733d04edaa909115ae7e83c3e Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 19 Sep 2014 04:20:08 +0000 Subject: Convert pubd to use Django ORM and lxml.etree. smoketest temporarily broken as it doesn't know anything about Django. svn path=/branches/tk705/; revision=5961 --- ca/tests/sql-cleaner.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ca/tests/sql-cleaner.py') diff --git a/ca/tests/sql-cleaner.py b/ca/tests/sql-cleaner.py index 0f0b55b1..369a68ea 100644 --- a/ca/tests/sql-cleaner.py +++ b/ca/tests/sql-cleaner.py @@ -29,11 +29,14 @@ for name in ("rpkid", "irdbd", "pubd"): username = cfg.get("%s_sql_username" % name, name[:4]) password = cfg.get("%s_sql_password" % name, "fnord") + # All of this schema creation stuff will go away once we're on Django ORM. + # For the moment, a quick kludge for testing. schema = [] - for line in getattr(rpki.sql_schemas, name, "").splitlines(): - schema.extend(line.partition("--")[0].split()) - schema = " ".join(schema).strip(";").split(";") - schema = [statement.strip() for statement in schema if statement and "DROP TABLE" not in statement] + if name == "rpkid": + for line in getattr(rpki.sql_schemas, name, "").splitlines(): + schema.extend(line.partition("--")[0].split()) + schema = " ".join(schema).strip(";").split(";") + schema = [statement.strip() for statement in schema if statement and "DROP TABLE" not in statement] db = MySQLdb.connect(user = username, passwd = password) cur = db.cursor() -- cgit v1.2.3