kkucharc commented on a change in pull request #11131:
URL: 
https://github.com/apache/incubator-superset/pull/11131#discussion_r499740961



##########
File path: tests/security_tests.py
##########
@@ -1122,6 +1132,41 @@ def test_rls_filter_doesnt_alter_energy_query(self):
         assert tbl.get_extra_cache_keys(self.query_obj) == []
         assert "value > 1" not in sql
 
+    @pytest.fixture()
+    def load_unicode_dashboard(self):
+        data = [
+            {"phrase": "Под"},
+            {"phrase": "řšž"},
+            {"phrase": "視野無限廣"},
+            {"phrase": "微風"},
+            {"phrase": "中国智造"},
+            {"phrase": "æøå"},
+            {"phrase": "ëœéè"},
+            {"phrase": "いろはにほ"},
+        ]
+        tbl_name = "unicode_test"
+
+        # generate date/numeric data
+        df = pd.DataFrame.from_dict(data)
+
+        with self.create_app().app_context():
+            database = get_example_database()
+            schema = {
+                "phrase": String(500),
+            }
+            obj = create_table_for_dashboard(df, tbl_name, database, schema)
+            obj.fetch_metadata()
+
+            tbl = obj
+            slc = create_slice("Unicode Cloud", "word_cloud", tbl, None)
+            o = 
db.session.query(Slice).filter_by(slice_name=slc.slice_name).first()
+            if o:
+                db.session.delete(o)
+            db.session.add(slc)
+            db.session.commit()
+            create_dashboard("unicode-test", "Unicode Test", None, slc)

Review comment:
       I refactored this part to separate fixture and I put there both. Thanks 
for suggestion!




----------------------------------------------------------------
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