Mercurial > p > roundup > code
diff test/test_mysql.py @ 6604:0d99ae7c8de6
Allow Roundup to use PostgreSQL database native full text search
back_postgreql.py - schema version changes for schema version 7.
configuration.py - added indexer_language checks for postgresql. Hardcoded
list for now.
Docs admin_guide and upgrading
Tests.
This also restructures the version upgrade tests for the rdbms
backends. They can run all of them now as the proper cascade is
developed to roll back changes to version 6.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 27 Jan 2022 19:48:48 -0500 |
| parents | 39189dd94f2c |
| children | 09d9c646ca89 |
line wrap: on
line diff
--- a/test/test_mysql.py Thu Jan 27 08:05:20 2022 +0100 +++ b/test/test_mysql.py Thu Jan 27 19:48:48 2022 -0500 @@ -74,7 +74,6 @@ if self.db.database_schema['version'] != 7: self.skipTest("This test only runs for database version 7") - self.db.database_schema['version'] = 6 # test by shrinking _words and trying to insert a long value # it should fail. @@ -92,7 +91,12 @@ self.assertIn("Data too long for column '_word'", ctx.exception.args[1]) - + + self.db.database_schema['version'] = 6 + + if hasattr(self,"downgrade_only"): + return + # test upgrade altering row self.db.post_init() @@ -104,6 +108,9 @@ with self.assertRaises(MySQLdb.DataError) as ctx: self.db.sql("insert into __words VALUES('%s',1)" % too_long_string) + self.assertEqual(self.db.database_schema['version'], + self.db.current_db_version) + @skip_mysql class mysqlROTest(mysqlOpener, ROTest, unittest.TestCase): def setUp(self):
