def test_compute_query_dict(self, range, query): bb = BaseBar(x="key") self.dashboard.add_charts([bb]) bb.filter_widget.value = range # test the following function behavior bb.compute_query_dict(self.dashboard._query_str_dict) assert self.dashboard._query_str_dict["key_bar"] == query
def test_compute_query_dict(self, range, query): bb = BaseBar(x="key") bb.min_value = self.dashboard._data[bb.x].min() bb.max_value = self.dashboard._data[bb.x].max() if bb.data_points > self.dashboard._data[bb.x].shape[0]: bb.data_points = self.dashboard._data[bb.x].shape[0] bb.add_range_slider_filter(self.dashboard) self.dashboard.add_charts([bb]) bb.filter_widget.value = range # test the following function behavior bb.compute_query_dict(self.dashboard._query_str_dict) assert self.dashboard._query_str_dict["key_bar"] == query