Mercurial > p > roundup > code
diff test/test_mysql.py @ 7206:521d98231e5c
Test self.db.db_version_updated in schema upgrade paths
A user on the roundup-users mailing list reported that a
'roundup-admin migrate' reported that changes were needed. But it
should have done the migration.
roundup-admin uses the property db.db_version_updated to tell if there
was a migration. Testing never looked at that property. Add a test for
that property in all migration updates.
AFAICT the test is always successful. So no bug uncovered by these
tests.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 02 Mar 2023 17:01:39 -0500 |
| parents | bdd28b244839 |
| children |
line wrap: on
line diff
--- a/test/test_mysql.py Wed Mar 01 13:04:54 2023 -0500 +++ b/test/test_mysql.py Thu Mar 02 17:01:39 2023 -0500 @@ -112,6 +112,8 @@ # test upgrade altering row self.db.post_init() + self.assertEqual(self.db.db_version_updated, True) + # This insert with text of expected column size should succeed self.db.sql("insert into __words VALUES('%s',1)" % long_string) @@ -165,6 +167,8 @@ # test upgrade self.db.post_init() + self.assertEqual(self.db.db_version_updated, True) + # verify they keep all signifcant digits before the decimal point for tablename in ['otk', 'session']: self.db.sql(
