chore(tests): Spelling (#25454)

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
This commit is contained in:
Josh Soref
2024-08-20 16:47:29 -04:00
committed by GitHub
parent 175ba78d32
commit 1818054166
15 changed files with 32 additions and 32 deletions

View File

@@ -55,11 +55,11 @@ def test_extract_errors() -> None:
from superset.db_engine_specs.athena import AthenaEngineSpec
msg = ": mismatched input 'fromm'. Expecting: "
msg = ": mismatched input 'from_'. Expecting: "
result = AthenaEngineSpec.extract_errors(Exception(msg))
assert result == [
SupersetError(
message='Please check your query for syntax errors at or near "fromm". Then, try running your query again.',
message='Please check your query for syntax errors at or near "from_". Then, try running your query again.',
error_type=SupersetErrorType.SYNTAX_ERROR,
level=ErrorLevel.ERROR,
extra={

View File

@@ -178,12 +178,12 @@ def test_extract_errors() -> None:
Test that custom error messages are extracted correctly.
"""
msg = ": mismatched input 'fromm'. Expecting: "
msg = ": mismatched input 'from_'. Expecting: "
result = DatabricksNativeEngineSpec.extract_errors(Exception(msg))
assert result == [
SupersetError(
message=": mismatched input 'fromm'. Expecting: ",
message=": mismatched input 'from_'. Expecting: ",
error_type=SupersetErrorType.GENERIC_DB_ENGINE_ERROR,
level=ErrorLevel.ERROR,
extra={
@@ -204,13 +204,13 @@ def test_extract_errors_with_context() -> None:
Test that custom error messages are extracted correctly with context.
"""
msg = ": mismatched input 'fromm'. Expecting: "
msg = ": mismatched input 'from_'. Expecting: "
context = {"hostname": "foo"}
result = DatabricksNativeEngineSpec.extract_errors(Exception(msg), context)
assert result == [
SupersetError(
message=": mismatched input 'fromm'. Expecting: ",
message=": mismatched input 'from_'. Expecting: ",
error_type=SupersetErrorType.GENERIC_DB_ENGINE_ERROR,
level=ErrorLevel.ERROR,
extra={

View File

@@ -94,7 +94,7 @@ def test_where_clause_n_prefix() -> None:
assert query == query_expected
def test_time_exp_mixd_case_col_1y() -> None:
def test_time_exp_mixed_case_col_1y() -> None:
from superset.db_engine_specs.mssql import MssqlEngineSpec
col = column("MixedCase")
@@ -291,14 +291,14 @@ def test_extract_errors() -> None:
msg = dedent(
"""
DB-Lib error message 20009, severity 9:
Unable to connect: Adaptive Server is unavailable or does not exist (locahost)
Unable to connect: Adaptive Server is unavailable or does not exist (localhost_)
"""
)
result = MssqlEngineSpec.extract_errors(Exception(msg))
assert result == [
SupersetError(
error_type=SupersetErrorType.CONNECTION_INVALID_HOSTNAME_ERROR,
message='The hostname "locahost" cannot be resolved.',
message='The hostname "localhost_" cannot be resolved.',
level=ErrorLevel.ERROR,
extra={
"engine_name": "Microsoft SQL Server",