mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
This commit is contained in:
@@ -836,9 +836,11 @@ def test_special_chars_in_column_name(app_context, physical_dataset):
|
||||
|
||||
query_object = qc.queries[0]
|
||||
df = qc.get_df_payload(query_object)["df"]
|
||||
|
||||
# sqlite doesn't have timestamp columns
|
||||
if query_object.datasource.database.backend != "sqlite":
|
||||
if query_object.datasource.database.backend == "sqlite":
|
||||
# sqlite returns string as timestamp column
|
||||
assert df["time column with spaces"][0] == "2002-01-03 00:00:00"
|
||||
assert df["I_AM_A_TRUNC_COLUMN"][0] == "2002-01-01 00:00:00"
|
||||
else:
|
||||
assert df["time column with spaces"][0].strftime("%Y-%m-%d") == "2002-01-03"
|
||||
assert df["I_AM_A_TRUNC_COLUMN"][0].strftime("%Y-%m-%d") == "2002-01-01"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user