コード例 #1
0
    def test_exact_prepare(self):
        exact = inputs.Exact("hello OR there, :you")
        self.assertEqual(exact.prepare(self.query_obj), '"hello OR there, :you"')

        # Incorrect, but the backend doesn't implement much of anything useful.
        exact = inputs.Exact("hello OR there, :you", clean=True)
        self.assertEqual(exact.prepare(self.query_obj), '"hello OR there, :you"')
コード例 #2
0
    def test_exact_prepare(self):
        exact = inputs.Exact('hello OR there, :you')
        self.assertEqual(exact.prepare(self.query_obj),
                         u'"hello OR there, :you"')

        exact = inputs.Exact('hello OR there, :you', clean=True)
        self.assertEqual(exact.prepare(self.query_obj),
                         u'"hello or there, \\:you"')
コード例 #3
0
 def test_exact_init(self):
     exact = inputs.Exact('hello OR there, :you')
     self.assertEqual(exact.query_string, 'hello OR there, :you')
     self.assertEqual(exact.post_process, True)
コード例 #4
0
 def test_exact_prepare(self):
     exact = inputs.Exact("hello OR there, :you")
     self.assertEqual(exact.prepare(self.query_obj),
                      '"hello OR there, :you"')