chore: apply pep8-naming rules for naming convention (#8261)

This commit is contained in:
Bowen Liang
2024-09-11 16:40:52 +08:00
committed by GitHub
parent 53f37a6704
commit 292220c596
95 changed files with 287 additions and 258 deletions

View File

@@ -10,6 +10,7 @@ MOCK = os.getenv("MOCK_SWITCH", "false") == "true"
class MockedHttp:
@staticmethod
def httpx_request(
method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], url: str, **kwargs
) -> httpx.Response:

View File

@@ -1,11 +1,11 @@
import pytest
from core.helper.code_executor.code_executor import CodeExecutionException, CodeExecutor
from core.helper.code_executor.code_executor import CodeExecutionError, CodeExecutor
CODE_LANGUAGE = "unsupported_language"
def test_unsupported_with_code_template():
with pytest.raises(CodeExecutionException) as e:
with pytest.raises(CodeExecutionError) as e:
CodeExecutor.execute_workflow_code_template(language=CODE_LANGUAGE, code="", inputs={})
assert str(e.value) == f"Unsupported language {CODE_LANGUAGE}"