Commits

Anonymous committed 5c6edb8

fix the report `sql_sub_vars` tests

  • Participants
  • Parent commits ceb6f9e
  • Branches 0.10-stable

Comments (0)

Files changed (1)

trac/ticket/tests/report.py

         self.report_module = ReportModule(self.env)
 
     def test_sub_var_no_quotes(self):
-        sql, args = self.report_module.sql_sub_vars("$VAR", {'VAR': 'value'})
+        req = Mock(hdf=dict())
+        sql, args = self.report_module.sql_sub_vars(req, "$VAR",
+                                                    {'VAR': 'value'})
         self.assertEqual("%s", sql)
         self.assertEqual(['value'], args)
 
     def test_sub_var_quotes(self):
-        sql, args = self.report_module.sql_sub_vars("'$VAR'", {'VAR': 'value'})
+        req = Mock(hdf=dict())
+        sql, args = self.report_module.sql_sub_vars(req, "'$VAR'",
+                                                    {'VAR': 'value'})
         self.assertEqual("''||%s||''", sql)
         self.assertEqual(['value'], args)