[exploreV2] mapStateToProps for fields (#1882)

* Controls support for mapStateToProps

* Binding methods in the constructor

* Adressing comments

* Fixing tests
This commit is contained in:
Maxime Beauchemin
2017-01-06 12:38:44 -08:00
committed by GitHub
parent 9a62d94630
commit 222671675c
11 changed files with 193 additions and 217 deletions

View File

@@ -486,10 +486,19 @@ class CoreTests(SupersetTestCase):
def test_fetch_datasource_metadata(self):
self.login(username='admin')
url = '/superset/fetch_datasource_metadata?datasource_type=table&' \
'datasource_id=1'
resp = json.loads(self.get_resp(url))
self.assertEqual(len(resp['field_options']), 21)
url = (
'/superset/fetch_datasource_metadata?'
'datasource_type=table&'
'datasource_id=1'
)
resp = self.get_json_resp(url)
keys = [
'name', 'filterable_cols', 'gb_cols', 'type', 'all_cols',
'order_by_choices', 'metrics_combo', 'granularity_sqla',
'time_grain_sqla', 'id',
]
for k in keys:
self.assertIn(k, resp.keys())
def test_fetch_all_tables(self):
self.login(username='admin')