villebro commented on a change in pull request #9366: deprecate groupby
controls in query_obj
URL:
https://github.com/apache/incubator-superset/pull/9366#discussion_r400320919
##########
File path: tests/viz_tests.py
##########
@@ -996,45 +978,14 @@ def test_get_properties(self):
self.assertTrue("" in str(context.exception))
- def test_process_spatial_query_obj(self):
- form_data = load_fixture("deck_path_form_data.json")
- datasource = self.get_datasource_mock()
- mock_key = "spatial_key"
- mock_gb = []
- test_viz_deckgl = viz.BaseDeckGLViz(datasource, form_data)
-
- with self.assertRaises(ValueError) as context:
- test_viz_deckgl.process_spatial_query_obj(mock_key, mock_gb)
-
- self.assertTrue("Bad spatial key" in str(context.exception))
-
- test_form_data = {
- "latlong_key": {"type": "latlong", "lonCol": "lon", "latCol":
"lat"},
- "delimited_key": {"type": "delimited", "lonlatCol": "lonlat"},
- "geohash_key": {"type": "geohash", "geohashCol": "geo"},
- }
-
- datasource = self.get_datasource_mock()
- expected_results = {
- "latlong_key": ["lon", "lat"],
- "delimited_key": ["lonlat"],
- "geohash_key": ["geo"],
- }
- for mock_key in ["latlong_key", "delimited_key", "geohash_key"]:
- mock_gb = []
- test_viz_deckgl = viz.BaseDeckGLViz(datasource, test_form_data)
- test_viz_deckgl.process_spatial_query_obj(mock_key, mock_gb)
- assert expected_results.get(mock_key) == mock_gb
-
Review comment:
Having separate spatial keys is deprecated, hence this test is no longer
needed: they are a selectable column like any other going forward.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]