def test_where_2(self, condition, expected): sql = Sql() self.assertIsInstance(sql.where(**condition), Sql) self.assertIn(sql.sql, expected['cond_str_set']) self.assertIn(json.dumps(sql.args), expected['cond_args_set'])
def test_where_1(self, condition, expected): sql = Sql() self.assertIsInstance(sql.where(condition), Sql) self.assertEqual(sql.sql, expected['cond_str']) self.assertEqual(sql.args, expected['cond_args'])