From 60d17e60d737ceed8b4315ff0558035f32c2a0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20=C3=85hl=C3=A9n?= Date: Thu, 14 Mar 2024 09:08:45 +0100 Subject: [PATCH] Fix pylint issues --- .../libs/notebook/src/notebook/api_tests.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/desktop/libs/notebook/src/notebook/api_tests.py b/desktop/libs/notebook/src/notebook/api_tests.py index d6518b9cf1b..108ab08bcb4 100644 --- a/desktop/libs/notebook/src/notebook/api_tests.py +++ b/desktop/libs/notebook/src/notebook/api_tests.py @@ -157,7 +157,7 @@ def test_save_notebook(self): assert_equal(doc.type, "query-hive") def test_type_when_saving_an_actual_notebook(self): - notebook_json = """ + notebook_json = """ { "selectedSnippet": "hive", "showHistory": false, @@ -175,24 +175,24 @@ def test_type_when_saving_an_actual_notebook(self): "snippets": [{"id":"2b7d1f46-17a0-30af-efeb-33d4c29b1055","type":"hive","status":"running","statement_raw":""" \ """"select * from default.web_logs where app = '${app_name}';","variables":""" \ """[{"name":"app_name","value":"metastore"}],"statement":""" \ - """"select * from default.web_logs where app = 'metastore';","properties":{"settings":[],"files":[],"functions":[]},""" \ + """"select 1;","properties":{"settings":[],"files":[],"functions":[]},""" \ """"result":{"id":"b424befa-f4f5-8799-a0b4-79753f2552b1","type":"table","handle":{"log_context":null,""" \ """"statements_count":1,"end":{"column":21,"row":0},"statement_id":0,"has_more_statements":false,""" \ """"start":{"column":0,"row":0},"secret":"rVRWw7YPRGqPT7LZ/TeFaA==an","has_result_set":true,""" \ """"statement":"select * from default.web_logs where app = 'metastore';","operation_type":0,""" \ - """"modified_row_count":null,"guid":"7xm6+epkRx6dyvYvGNYePA==an"}},"lastExecuted": 1462554843817,"database":"default"}], + """"modified_row_count":null,"guid":"7xm6"}},"lastExecuted": 1462554843817,"database":"default"}], "uuid": "d9efdee1-ef25-4d43-b8f9-1a170f69a05a" } """ - response = self.client.post(reverse('notebook:save_notebook'), {'notebook': notebook_json}) - data = json.loads(response.content) + response = self.client.post(reverse('notebook:save_notebook'), {'notebook': notebook_json}) + data = json.loads(response.content) - assert_equal(0, data['status'], data) - assert_equal('notebook', data['type'], data) - doc = Document2.objects.get(pk=data['id']) + assert_equal(0, data['status'], data) + assert_equal('notebook', data['type'], data) + doc = Document2.objects.get(pk=data['id']) - assert_equal(doc.type, "notebook") + assert_equal(doc.type, "notebook") def test_save_notebook_with_connector_off(self): reset = ENABLE_CONNECTORS.set_for_testing(False)