willbarrett commented on a change in pull request #11308:
URL: 
https://github.com/apache/incubator-superset/pull/11308#discussion_r508769289



##########
File path: tests/fixtures/energy_dashboard.py
##########
@@ -0,0 +1,357 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import random
+import textwrap
+from typing import Dict, Set
+
+import pandas as pd
+import pytest
+from pandas import DataFrame
+from sqlalchemy import column, Float, String
+
+from superset import db
+from superset.connectors.sqla.models import SqlaTable, SqlMetric
+from superset.models.dashboard import Dashboard
+from superset.models.slice import Slice
+from superset.utils.core import get_example_database
+from tests.dashboard_utils import create_slice, create_table_for_dashboard
+from tests.test_app import app
+
+misc_dash_slices: Set[str] = set()
+
+
[email protected]()
+def load_energy_table_with_slice():
+    table_name = "energy_usage"
+    df = _get_dataframe()
+    with app.app_context():
+        yield _create_energy_table(df, table_name)

Review comment:
       should this be:
   ```python
   _create_energy_table(df, table_name)
   yield
   _cleanup()
   ```
   ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to