mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[flake8] Fixing additional flake8 issue w/ the presence of ignore (#4474)
This commit is contained in:
@@ -11,7 +11,8 @@ import yaml
|
||||
|
||||
from superset import db
|
||||
from superset.connectors.druid.models import (
|
||||
DruidColumn, DruidDatasource, DruidMetric)
|
||||
DruidColumn, DruidDatasource, DruidMetric,
|
||||
)
|
||||
from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn
|
||||
from .base_tests import SupersetTestCase
|
||||
|
||||
@@ -81,12 +82,12 @@ class DictImportExportTests(SupersetTestCase):
|
||||
cluster_name = 'druid_test'
|
||||
params = {DBREF: id, 'database_name': cluster_name}
|
||||
dict_rep = {
|
||||
'cluster_name': cluster_name,
|
||||
'datasource_name': name,
|
||||
'id': id,
|
||||
'params': json.dumps(params),
|
||||
'columns': [{'column_name': c} for c in cols_names],
|
||||
'metrics': [{'metric_name': c} for c in metric_names],
|
||||
'cluster_name': cluster_name,
|
||||
'datasource_name': name,
|
||||
'id': id,
|
||||
'params': json.dumps(params),
|
||||
'columns': [{'column_name': c} for c in cols_names],
|
||||
'metrics': [{'metric_name': c} for c in metric_names],
|
||||
}
|
||||
|
||||
datasource = DruidDatasource(
|
||||
@@ -180,12 +181,12 @@ class DictImportExportTests(SupersetTestCase):
|
||||
imported_table = SqlaTable.import_from_dict(db.session, dict_table)
|
||||
db.session.commit()
|
||||
table_over, dict_table_over = self.create_table(
|
||||
'table_override', id=ID_PREFIX + 3,
|
||||
cols_names=['new_col1', 'col2', 'col3'],
|
||||
metric_names=['new_metric1'])
|
||||
'table_override', id=ID_PREFIX + 3,
|
||||
cols_names=['new_col1', 'col2', 'col3'],
|
||||
metric_names=['new_metric1'])
|
||||
imported_over_table = SqlaTable.import_from_dict(
|
||||
db.session,
|
||||
dict_table_over)
|
||||
db.session,
|
||||
dict_table_over)
|
||||
db.session.commit()
|
||||
|
||||
imported_over = self.get_table(imported_over_table.id)
|
||||
@@ -289,8 +290,8 @@ class DictImportExportTests(SupersetTestCase):
|
||||
cols_names=['new_col1', 'col2', 'col3'],
|
||||
metric_names=['new_metric1'])
|
||||
imported_over_cluster = DruidDatasource.import_from_dict(
|
||||
db.session,
|
||||
table_over_dict)
|
||||
db.session,
|
||||
table_over_dict)
|
||||
db.session.commit()
|
||||
imported_over = self.get_datasource(imported_over_cluster.id)
|
||||
self.assertEquals(imported_cluster.id, imported_over.id)
|
||||
|
||||
Reference in New Issue
Block a user