File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -68,15 +68,6 @@ def tearDown(self):
6868 DBTest .tearDown (self )
6969 postgresqlOpener .tearDown (self )
7070
71- def does_index_exist (self , index_name ):
72- sql = """SELECT count(*) > 0
73- FROM pg_class c
74- WHERE c.relname = '%s'
75- AND c.relkind = 'i';""" % index_name
76-
77- self .db .sql (sql )
78- return self .db .cursor .fetchone ()[0 ]
79-
8071 def testUpgrade_6_to_7 (self ):
8172
8273 # load the database
@@ -113,7 +104,7 @@ def testUpgrade_6_to_7(self):
113104 self .db .sql ("select * from _fts" )
114105 self .db .rollback ()
115106
116- self .assertFalse (self .does_index_exist ( '__fts_idx' ))
107+ self .assertFalse (self .db . sql_index_exists ( '__fts' , '__fts_idx' ))
117108
118109 if hasattr (self , "downgrade_only" ):
119110 return
@@ -132,7 +123,7 @@ def testUpgrade_6_to_7(self):
132123 # clean db handle
133124 self .db .rollback ()
134125
135- self .assertTrue (self .does_index_exist ( '__fts_idx' ))
126+ self .assertTrue (self .db . sql_index_exists ( '__fts' , '__fts_idx' ))
136127
137128 self .db .sql ("select * from __fts" )
138129
You can’t perform that action at this time.
0 commit comments