예제 #1
0
 def test_having_2(self, condition, expected):
     sql = Sql()
     self.assertIsInstance(sql.having(**condition), Sql)
     self.assertIn(sql.sql, expected['cond_str_set'])
     self.assertIn(json.dumps(sql.args), expected['cond_args_set'])
예제 #2
0
 def test_having_1(self, condition, expected):
     sql = Sql()
     self.assertIsInstance(sql.having(condition), Sql)
     self.assertEqual(sql.sql, expected['cond_str'])
     self.assertEqual(sql.args, expected['cond_args'])