Mercurial > p > roundup > code
diff test/test_config.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 | 770503bd211e |
| children | ab2ed11c021e |
line wrap: on
line diff
--- a/test/test_config.py Thu Jan 27 08:05:20 2022 +0100 +++ b/test/test_config.py Thu Jan 27 19:48:48 2022 -0500 @@ -704,6 +704,24 @@ # if exception not generated assertRaises # will generate failure. + def testInvalidIndexerLanguage_w_native_fts(self): + """ Use explicit native-fts indexer. Verify exception is + generated. + """ + + self.munge_configini(mods=[ ("indexer = ", "native-fts"), + ("indexer_language = ", "NO_LANG") ]) + + with self.assertRaises(configuration.OptionValueError) as cm: + config.load(self.dirname) + + # test repr. The type is right since it passed assertRaises. + self.assertIn("OptionValueError", repr(cm.exception)) + # look for failing language + self.assertIn("NO_LANG", cm.exception.args[1]) + # look for supported language + self.assertIn("basque", cm.exception.args[2]) + def testLoadConfig(self): """ run load to validate config """
