mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: change the validation logic for python_date_format (#25510)
Co-authored-by: John Bodley <john.bodley@gmail.com>
This commit is contained in:
@@ -211,7 +211,6 @@ def test_python_date_format_by_column_name(
|
||||
"dttm_columns": {
|
||||
"id": {"python_date_format": "epoch_ms"},
|
||||
"dttm": {"python_date_format": "epoch_s"},
|
||||
"duration_ms": {"python_date_format": "invalid"},
|
||||
},
|
||||
}
|
||||
mocker.patch(
|
||||
@@ -228,7 +227,6 @@ def test_python_date_format_by_column_name(
|
||||
return_value=[
|
||||
{"column_name": "id", "type": "INTEGER", "is_dttm": False},
|
||||
{"column_name": "dttm", "type": "INTEGER", "is_dttm": False},
|
||||
{"column_name": "duration_ms", "type": "INTEGER", "is_dttm": False},
|
||||
],
|
||||
)
|
||||
|
||||
@@ -242,12 +240,6 @@ def test_python_date_format_by_column_name(
|
||||
assert dttm_col.is_dttm
|
||||
assert dttm_col.python_date_format == "epoch_s"
|
||||
|
||||
duration_ms_col = [c for c in test_table.columns if c.column_name == "duration_ms"][
|
||||
0
|
||||
]
|
||||
assert duration_ms_col.is_dttm
|
||||
assert duration_ms_col.python_date_format == "invalid"
|
||||
|
||||
|
||||
def test_expression_by_column_name(
|
||||
mocker: MockerFixture,
|
||||
|
||||
Reference in New Issue
Block a user