def setUp(self): self.basedir = "UnicodeChanges" if os.path.exists(self.basedir): shutil.rmtree(self.basedir) os.makedirs(self.basedir) # Now try the upgrade process, which will import the old changes. self.spec = DBSpec.from_url("sqlite:///state.sqlite", self.basedir) self.db = DBConnector(self.spec) self.db.start()
def setUp(self): self.basedir = "WeirdChanges" if os.path.exists(self.basedir): shutil.rmtree(self.basedir) os.makedirs(self.basedir) # Now try the upgrade process, which will import the old changes. self.spec = DBSpec.from_url("sqlite:///state.sqlite", self.basedir) self.db = DBConnector(self.spec) self.db.start()
def setUp(self): self.basedir = "ChangeProperties" if os.path.exists(self.basedir): shutil.rmtree(self.basedir) os.makedirs(self.basedir) self.spec = DBSpec.from_url("sqlite:///state.sqlite", self.basedir) self.sm = manager.DBSchemaManager(self.spec, self.basedir) self.sm.upgrade(quiet=True) self.db = DBConnector(self.spec) self.db.start()
def setUp(self): self.basedir = "MySQLDBUnicodeChanges" if os.path.exists(self.basedir): shutil.rmtree(self.basedir) os.makedirs(self.basedir) # Now try the upgrade process, which will import the old changes. self.spec = DBSpec.from_url("mysql://*****:*****@localhost/buildbot_test", self.basedir) self.db = DBConnector(self.spec) self.db.start() result = self.db.runQueryNow("SHOW TABLES") for row in result: self.db.runQueryNow("DROP TABLE %s" % row[0]) self.db.runQueryNow("COMMIT")
def setUp(self): self.basedir = "MySQLDBUnicodeChanges" if os.path.exists(self.basedir): shutil.rmtree(self.basedir) os.makedirs(self.basedir) # Now try the upgrade process, which will import the old changes. self.spec = DBSpec.from_url( "mysql://*****:*****@localhost/buildbot_test", self.basedir) self.db = DBConnector(self.spec) self.db.start() result = self.db.runQueryNow("SHOW TABLES") for row in result: self.db.runQueryNow("DROP TABLE %s" % row[0]) self.db.runQueryNow("COMMIT")