Родитель
5dd6f7f930
Коммит
7b9654a97a
|
@ -344,14 +344,14 @@ class RedashClient(object):
|
|||
return fork
|
||||
|
||||
def search_queries(self, keyword):
|
||||
url_path = "queries/search?q={0}&{1}".format(keyword, self._url_params)
|
||||
url_path = "queries?q={0}&{1}".format(keyword, self._url_params)
|
||||
query_url = urljoin(self.API_BASE_URL, url_path)
|
||||
|
||||
json_result, response = self._make_request(
|
||||
requests.get, query_url)
|
||||
|
||||
templated_queries = []
|
||||
for query in json_result:
|
||||
for query in json_result["results"]:
|
||||
query_id = query.get("id", None)
|
||||
visualization = self._get_visualization(query_id)
|
||||
options = visualization.get("options", None)
|
||||
|
|
|
@ -411,12 +411,14 @@ class TestRedashClient(AppTest):
|
|||
|
||||
def test_search_queries_returns_correct_attributes(self):
|
||||
self.get_calls = 0
|
||||
QUERIES_IN_SEARCH = [{
|
||||
QUERIES_IN_SEARCH = {
|
||||
"results": [{
|
||||
"id": 5,
|
||||
"description": "SomeQuery",
|
||||
"name": "Query Title",
|
||||
"data_source_id": 5
|
||||
}]
|
||||
}
|
||||
VISUALIZATIONS_FOR_QUERY = {
|
||||
"visualizations": [
|
||||
{"options": {}},
|
||||
|
|
Загрузка…
Ссылка в новой задаче