Пример #1
0
    def test_can_use_base_conditional(self):
        p = Pypher()
        p.CONDITIONAL(1, 2, 3)

        s = str(p)
        params = p.bound_params
        exp = '(${one}, ${two}, ${three})'.format(one=get_dict_key(params, 1),
            two=get_dict_key(params, 2), three=get_dict_key(params, 3))

        self.assertEqual(exp, s)
        self.assertEqual(3, len(params))