comparison test/test_liveserver.py @ 6918:cb2ed1e8c852

Change method for settin indexer; have test_livetest for pg cleanup Add code to defer opening the indexer only if indexer is native-fts. See if this fixes the sqlite OperationalError. Also under python 2.7 (only), the db from test_livetracker when using postgres FTS didn't empty the db. This caused the following test_postgres.py test to fail. Why it only showed up on 2.7 and not any of the 3.x releases is a mystery.
author John Rouillard <rouilj@ieee.org>
date Tue, 06 Sep 2022 14:43:36 -0400
parents 9ff091537f43
children ff2c8b430738
comparison
equal deleted inserted replaced
6917:fba76e0bba98 6918:cb2ed1e8c852
1181 cls.backup_domain = i18n.DOMAIN 1181 cls.backup_domain = i18n.DOMAIN
1182 cls.backup_locale_dirs = i18n.LOCALE_DIRS 1182 cls.backup_locale_dirs = i18n.LOCALE_DIRS
1183 i18n.LOCALE_DIRS = ['locale'] 1183 i18n.LOCALE_DIRS = ['locale']
1184 i18n.DOMAIN = '' 1184 i18n.DOMAIN = ''
1185 1185
1186 @classmethod
1187 def tearDownClass(cls):
1188 # cleanup
1189 cls.instance.backend.db_nuke(cls.db.config)
1190
1186 def test_native_fts(self): 1191 def test_native_fts(self):
1187 self.assertIn("postgresql_fts", str(self.db.indexer)) 1192 self.assertIn("postgresql_fts", str(self.db.indexer))
1188 1193
1189 # use a ts: search as well so it only works on postgres_fts indexer 1194 # use a ts: search as well so it only works on postgres_fts indexer
1190 f = requests.get(self.url_base() + "?@search_text=ts:RESULT") 1195 f = requests.get(self.url_base() + "?@search_text=ts:RESULT")

Roundup Issue Tracker: http://roundup-tracker.org/