diff options
author | Rob Austein <sra@hactrn.net> | 2014-09-19 04:20:08 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-09-19 04:20:08 +0000 |
commit | bcd211ab6dfb899733d04edaa909115ae7e83c3e (patch) | |
tree | d1fc77460878fdfdcc444f7e9bcc91898477bb0d /ca/tests/sql-cleaner.py | |
parent | 3f4f7622dbbf2943a83ac70d819d3837e845f7f6 (diff) |
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
Diffstat (limited to 'ca/tests/sql-cleaner.py')
-rw-r--r-- | ca/tests/sql-cleaner.py | 11 |
1 files changed, 7 insertions, 4 deletions
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() |