コード例 #1
0
    def test_raw_init(self):
        raw = inputs.Raw('hello OR there, :you')
        self.assertEqual(raw.query_string, 'hello OR there, :you')
        self.assertEqual(raw.kwargs, {})
        self.assertEqual(raw.post_process, False)

        raw = inputs.Raw('hello OR there, :you', test='really')
        self.assertEqual(raw.query_string, 'hello OR there, :you')
        self.assertEqual(raw.kwargs, {'test': 'really'})
        self.assertEqual(raw.post_process, False)
コード例 #2
0
    def test_raw_init(self):
        raw = inputs.Raw("hello OR there, :you")
        self.assertEqual(raw.query_string, "hello OR there, :you")
        self.assertEqual(raw.kwargs, {})
        self.assertEqual(raw.post_process, False)

        raw = inputs.Raw("hello OR there, :you", test="really")
        self.assertEqual(raw.query_string, "hello OR there, :you")
        self.assertEqual(raw.kwargs, {"test": "really"})
        self.assertEqual(raw.post_process, False)
コード例 #3
0
 def test_raw_prepare(self):
     raw = inputs.Raw('hello OR there, :you')
     self.assertEqual(raw.prepare(self.query_obj), 'hello OR there, :you')