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'])
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'])