From 0e59cd1c086df399eff1e5bf49c2cbc29bafccf9 Mon Sep 17 00:00:00 2001 From: qizhicheng Date: Mon, 14 Aug 2023 18:36:27 +0800 Subject: [PATCH] black --- sql/engines/test_cassandra.py | 4 +++- sql/tests.py | 17 ++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sql/engines/test_cassandra.py b/sql/engines/test_cassandra.py index 6f167fd122..0c04ba6b03 100644 --- a/sql/engines/test_cassandra.py +++ b/sql/engines/test_cassandra.py @@ -82,7 +82,9 @@ def test_get_all_tables(self, mock_query): def test_describe_table(self, mock_query): mock_query.return_value = ResultSet() self.engine.describe_table("some_db", "some_table") - mock_query.assert_called_once_with(db_name="some_db", sql="describe table some_table") + mock_query.assert_called_once_with( + db_name="some_db", sql="describe table some_table" + ) @patch("sql.engines.cassandra.CassandraEngine.query") def test_get_all_columns_by_tb(self, mock_query): diff --git a/sql/tests.py b/sql/tests.py index c04348c03c..c667c40ff2 100644 --- a/sql/tests.py +++ b/sql/tests.py @@ -1,5 +1,4 @@ import json -import re import unittest from datetime import timedelta, datetime, date from unittest.mock import MagicMock, patch, ANY @@ -745,7 +744,7 @@ def test_query_priv_check_tb_priv_exist(self, __db_priv, __tb_priv, __table_ref) @patch("sql.query_privileges._tb_priv", return_value=False) @patch("sql.query_privileges._db_priv", return_value=False) def test_query_priv_check_table_ref_Exception_and_no_db_priv( - self, __db_priv, __tb_priv, __table_ref + self, __db_priv, __tb_priv, __table_ref ): """ 测试用户权限校验,mysql实例、普通用户 ,inception语法树抛出异常 @@ -2552,7 +2551,7 @@ def test_param_history(self): @patch("sql.engines.mysql.MysqlEngine.get_variables") @patch("sql.engines.get_engine") def test_param_edit_variable_not_config( - self, _get_engine, _get_variables, _set_variable + self, _get_engine, _get_variables, _set_variable ): """ 测试参数修改,参数未在模板配置 @@ -2572,7 +2571,7 @@ def test_param_edit_variable_not_config( @patch("sql.engines.mysql.MysqlEngine.get_variables") @patch("sql.engines.get_engine") def test_param_edit_variable_not_change( - self, _get_engine, _get_variables, _set_variable + self, _get_engine, _get_variables, _set_variable ): """ 测试参数修改,已在参数模板配置,但是值无变化 @@ -2602,7 +2601,7 @@ def test_param_edit_variable_not_change( @patch("sql.engines.mysql.MysqlEngine.get_variables") @patch("sql.engines.get_engine") def test_param_edit_variable_change( - self, _get_engine, _get_variables, _set_variable + self, _get_engine, _get_variables, _set_variable ): """ 测试参数修改,已在参数模板配置,且值有变化 @@ -2632,7 +2631,7 @@ def test_param_edit_variable_change( @patch("sql.engines.mysql.MysqlEngine.get_variables") @patch("sql.engines.get_engine") def test_param_edit_variable_error( - self, _get_engine, _get_variables, _set_variable + self, _get_engine, _get_variables, _set_variable ): """ 测试参数修改,已在参数模板配置,修改抛错 @@ -2837,7 +2836,7 @@ def test_notify_for_sqlreview_audit_abort(self, _auth_group_users, _msg_sender): @patch("sql.notify.MsgSender") @patch("sql.notify.auth_group_users") def test_notify_for_sqlreview_wrong_workflow_type( - self, _auth_group_users, _msg_sender + self, _auth_group_users, _msg_sender ): """ 测试不存在的工单类型 @@ -2857,7 +2856,7 @@ def test_notify_for_sqlreview_wrong_workflow_type( @patch("sql.notify.MsgSender") @patch("sql.notify.auth_group_users") def test_notify_for_query_audit_wait_apply_db_perm( - self, _auth_group_users, _msg_sender + self, _auth_group_users, _msg_sender ): """ 测试查询申请库权限 @@ -2883,7 +2882,7 @@ def test_notify_for_query_audit_wait_apply_db_perm( @patch("sql.notify.MsgSender") @patch("sql.notify.auth_group_users") def test_notify_for_query_audit_wait_apply_tb_perm( - self, _auth_group_users, _msg_sender + self, _auth_group_users, _msg_sender ): """ 测试查询申请表权限