From 3719ae4818a6d070cbf601dfffcff8630e372d0b Mon Sep 17 00:00:00 2001 From: Alexandre Lavigne Date: Tue, 27 Feb 2024 21:56:54 +0100 Subject: [PATCH 1/3] Fix wrapper `cast_to_a1_notation` fix the wrapper method cast_to_a1_notation. It must check that the 4 first arguments are actual ints. Then it should only try to cast the arguments at position 3 and 4 only, not the rest of the list. closes #1055 Signed-off-by: Alexandre Lavigne --- gspread/utils.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gspread/utils.py b/gspread/utils.py index 0dcb55341..f3a5d2623 100644 --- a/gspread/utils.py +++ b/gspread/utils.py @@ -527,17 +527,23 @@ def cast_to_a1_notation(method: Callable[..., Any]) -> Callable[..., Any]: method calls. """ + def contains_row_cols(args: Tuple[Any, ...]) -> bool: + return ( + isinstance(args[0], int) + and isinstance(args[1], int) + and isinstance(args[2], int) + and isinstance(args[3], int) + ) + @wraps(method) def wrapper(self: Any, *args: Any, **kwargs: Any) -> Any: try: - if len(args): - int(args[0]) - + if len(args) >= 4 and contains_row_cols(args): # Convert to A1 notation # Assuming rowcol_to_a1 has appropriate typing range_start = rowcol_to_a1(*args[:2]) # Assuming rowcol_to_a1 has appropriate typing - range_end = rowcol_to_a1(*args[-2:]) + range_end = rowcol_to_a1(*args[2:4]) range_name = ":".join((range_start, range_end)) args = (range_name,) + args[4:] From 8fbe2a54e421cb000fa41045a1ba59cd41de2e8d Mon Sep 17 00:00:00 2001 From: Alexandre Lavigne Date: Wed, 28 Feb 2024 18:29:44 +0100 Subject: [PATCH 2/3] Add test Signed-off-by: Alexandre Lavigne --- ...t.test_define_named_range_coordinates.json | 457 ++++++++++++++++++ tests/cell_test.py | 16 + 2 files changed, 473 insertions(+) create mode 100644 tests/cassettes/CellTest.test_define_named_range_coordinates.json diff --git a/tests/cassettes/CellTest.test_define_named_range_coordinates.json b/tests/cassettes/CellTest.test_define_named_range_coordinates.json new file mode 100644 index 000000000..7d5fa05df --- /dev/null +++ b/tests/cassettes/CellTest.test_define_named_range_coordinates.json @@ -0,0 +1,457 @@ +{ + "version": 1, + "interactions": [ + { + "request": { + "method": "POST", + "uri": "https://www.googleapis.com/drive/v3/files?supportsAllDrives=True", + "body": "{\"name\": \"Test CellTest test_define_named_range_coordinates\", \"mimeType\": \"application/vnd.google-apps.spreadsheet\"}", + "headers": { + "User-Agent": [ + "python-requests/2.31.0" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "116" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Server": [ + "ESF" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin, X-Origin" + ], + "Date": [ + "Wed, 28 Feb 2024 17:28:42 GMT" + ], + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ], + "content-length": [ + "203" + ] + }, + "body": { + "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"name\": \"Test CellTest test_define_named_range_coordinates\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?includeGridData=false", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.31.0" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Server": [ + "ESF" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Cache-Control": [ + "private" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "Date": [ + "Wed, 28 Feb 2024 17:28:43 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "content-length": [ + "3347" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range_coordinates\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE/edit\"\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?includeGridData=false", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.31.0" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Server": [ + "ESF" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Cache-Control": [ + "private" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "Date": [ + "Wed, 28 Feb 2024 17:28:44 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "content-length": [ + "3347" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range_coordinates\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE/edit\"\n}\n" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE:batchUpdate", + "body": "{\"requests\": [{\"addNamedRange\": {\"namedRange\": {\"name\": \"testNamedRange\", \"range\": {\"startRowIndex\": 0, \"endRowIndex\": 2, \"startColumnIndex\": 0, \"endColumnIndex\": 2, \"sheetId\": 0}}}}]}", + "headers": { + "User-Agent": [ + "python-requests/2.31.0" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "184" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Server": [ + "ESF" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Cache-Control": [ + "private" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "Date": [ + "Wed, 28 Feb 2024 17:28:44 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "content-length": [ + "407" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"replies\": [\n {\n \"addNamedRange\": {\n \"namedRange\": {\n \"namedRangeId\": \"1051772979\",\n \"name\": \"testNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n }\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?fields=namedRanges", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.31.0" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Server": [ + "ESF" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Cache-Control": [ + "private" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "Date": [ + "Wed, 28 Feb 2024 17:28:44 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "content-length": [ + "245" + ] + }, + "body": { + "string": "{\n \"namedRanges\": [\n {\n \"namedRangeId\": \"1051772979\",\n \"name\": \"testNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "DELETE", + "uri": "https://www.googleapis.com/drive/v3/files/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?supportsAllDrives=True", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.31.0" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "0" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Content-Length": [ + "0" + ], + "Content-Type": [ + "text/html" + ], + "X-XSS-Protection": [ + "0" + ], + "Pragma": [ + "no-cache" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Server": [ + "ESF" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin, X-Origin" + ], + "Date": [ + "Wed, 28 Feb 2024 17:28:45 GMT" + ], + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ] + }, + "body": { + "string": "" + } + } + } + ] +} diff --git a/tests/cell_test.py b/tests/cell_test.py index 87a600952..b618295e0 100644 --- a/tests/cell_test.py +++ b/tests/cell_test.py @@ -127,6 +127,22 @@ def test_define_named_range(self): # clean up the named range self.sheet.delete_named_range(named_range["namedRangeId"]) + @pytest.mark.vcr() + def test_define_named_range_coordinates(self): + range_name = "testNamedRange" + self.sheet.define_named_range(1, 1, 2, 2, range_name) + + named_range_dict = self.spreadsheet.fetch_sheet_metadata( + params={"fields": "namedRanges"} + ) + + # make sure that a range was returned and it has the namedRanges key, + # also that the dict contains a single range + self.assertNotEqual(named_range_dict, {}) + self.assertIn("namedRanges", named_range_dict) + self.assertTrue(len(named_range_dict["namedRanges"]) == 1) + self.assertEqual(named_range_dict["namedRanges"][0]["name"], range_name) + @pytest.mark.vcr() def test_delete_named_range(self): # define a named range From ab70b484acf33ebc43a7f23016d86af57e2482a7 Mon Sep 17 00:00:00 2001 From: Alexandre Lavigne Date: Sat, 2 Mar 2024 11:36:21 +0100 Subject: [PATCH 3/3] combine define_named_range tests into a single test --- .../CellTest.test_define_named_range.json | 1555 +++-------------- ...t.test_define_named_range_coordinates.json | 457 ----- tests/cell_test.py | 27 +- 3 files changed, 273 insertions(+), 1766 deletions(-) delete mode 100644 tests/cassettes/CellTest.test_define_named_range_coordinates.json diff --git a/tests/cassettes/CellTest.test_define_named_range.json b/tests/cassettes/CellTest.test_define_named_range.json index d67102c3c..1a3758ee7 100644 --- a/tests/cassettes/CellTest.test_define_named_range.json +++ b/tests/cassettes/CellTest.test_define_named_range.json @@ -19,12 +19,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], "Content-Length": [ "104" ], @@ -42,38 +36,38 @@ "message": "OK" }, "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" + "Pragma": [ + "no-cache" ], - "Vary": [ - "Origin, X-Origin" + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" ], - "X-XSS-Protection": [ - "0" + "X-Content-Type-Options": [ + "nosniff" ], - "X-Frame-Options": [ - "SAMEORIGIN" + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" + "Date": [ + "Sat, 02 Mar 2024 10:34:37 GMT" ], "Transfer-Encoding": [ "chunked" ], - "Pragma": [ - "no-cache" + "X-Frame-Options": [ + "SAMEORIGIN" ], - "X-Content-Type-Options": [ - "nosniff" + "Vary": [ + "Origin, X-Origin" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" ], - "Date": [ - "Thu, 20 Jul 2023 08:47:51 GMT" + "Content-Type": [ + "application/json; charset=UTF-8" ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" + "X-XSS-Protection": [ + "0" ], "Server": [ "ESF" @@ -83,14 +77,14 @@ ] }, "body": { - "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI\",\n \"name\": \"Test CellTest test_define_named_range\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" + "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4\",\n \"name\": \"Test CellTest test_define_named_range\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI?includeGridData=false", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4?includeGridData=false", "body": null, "headers": { "User-Agent": [ @@ -105,12 +99,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], "authorization": [ "" ] @@ -122,34 +110,37 @@ "message": "OK" }, "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" + "x-l2-request-path": [ + "l2-managed-6" ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" ], - "X-XSS-Protection": [ - "0" + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 02 Mar 2024 10:34:38 GMT" + ], + "Transfer-Encoding": [ + "chunked" ], "X-Frame-Options": [ "SAMEORIGIN" ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], "Cache-Control": [ "private" ], - "Transfer-Encoding": [ - "chunked" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + "Content-Type": [ + "application/json; charset=UTF-8" ], - "Date": [ - "Thu, 20 Jul 2023 08:47:51 GMT" + "X-XSS-Protection": [ + "0" ], "Server": [ "ESF" @@ -159,14 +150,14 @@ ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI/edit\"\n}\n" + "string": "{\n \"spreadsheetId\": \"1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4/edit\"\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://www.googleapis.com/drive/v3/files/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI?supportsAllDrives=True&includeItemsFromAllDrives=True&fields=id%2Cname%2CcreatedTime%2CmodifiedTime", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4?includeGridData=false", "body": null, "headers": { "User-Agent": [ @@ -181,12 +172,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], "authorization": [ "" ] @@ -198,114 +183,37 @@ "message": "OK" }, "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin, X-Origin" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "Transfer-Encoding": [ - "chunked" + "x-l2-request-path": [ + "l2-managed-6" ], - "Pragma": [ - "no-cache" + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" ], "X-Content-Type-Options": [ "nosniff" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], "Date": [ - "Thu, 20 Jul 2023 08:47:51 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ], - "Server": [ - "ESF" - ], - "content-length": [ - "201" - ] - }, - "body": { - "string": "{\n \"id\": \"1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI\",\n \"name\": \"Test CellTest test_define_named_range\",\n \"createdTime\": \"2023-07-20T08:47:49.640Z\",\n \"modifiedTime\": \"2023-07-20T08:47:50.525Z\"\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI?includeGridData=false", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" + "Sat, 02 Mar 2024 10:34:39 GMT" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" + "Transfer-Encoding": [ + "chunked" ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" + "X-Frame-Options": [ + "SAMEORIGIN" ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], "Cache-Control": [ "private" ], - "Transfer-Encoding": [ - "chunked" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + "Content-Type": [ + "application/json; charset=UTF-8" ], - "Date": [ - "Thu, 20 Jul 2023 08:47:52 GMT" + "X-XSS-Protection": [ + "0" ], "Server": [ "ESF" @@ -315,14 +223,14 @@ ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI/edit\"\n}\n" + "string": "{\n \"spreadsheetId\": \"1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4/edit\"\n}\n" } } }, { "request": { "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI:batchUpdate", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4:batchUpdate", "body": "{\"requests\": [{\"addNamedRange\": {\"namedRange\": {\"name\": \"TestDefineNamedRange\", \"range\": {\"startRowIndex\": 0, \"endRowIndex\": 2, \"startColumnIndex\": 0, \"endColumnIndex\": 2, \"sheetId\": 0}}}}]}", "headers": { "User-Agent": [ @@ -337,12 +245,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], "Content-Length": [ "190" ], @@ -360,1080 +262,54 @@ "message": "OK" }, "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Cache-Control": [ - "private" + "x-l2-request-path": [ + "l2-managed-6" ], - "Transfer-Encoding": [ - "chunked" + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" ], "X-Content-Type-Options": [ "nosniff" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], "Date": [ - "Thu, 20 Jul 2023 08:47:52 GMT" - ], - "Server": [ - "ESF" - ], - "content-length": [ - "413" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI\",\n \"replies\": [\n {\n \"addNamedRange\": {\n \"namedRange\": {\n \"namedRangeId\": \"1027309467\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n }\n }\n ]\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI?fields=namedRanges", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" + "Sat, 02 Mar 2024 10:34:39 GMT" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" + "Transfer-Encoding": [ + "chunked" ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" + "X-Frame-Options": [ + "SAMEORIGIN" ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Cache-Control": [ - "private" - ], - "Transfer-Encoding": [ - "chunked" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Date": [ - "Thu, 20 Jul 2023 08:47:52 GMT" - ], - "Server": [ - "ESF" - ], - "content-length": [ - "251" - ] - }, - "body": { - "string": "{\n \"namedRanges\": [\n {\n \"namedRangeId\": \"1027309467\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n ]\n}\n" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI:batchUpdate", - "body": "{\"requests\": [{\"deleteNamedRange\": {\"namedRangeId\": \"1027309467\"}}]}", - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "Content-Length": [ - "68" - ], - "Content-Type": [ - "application/json" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Cache-Control": [ - "private" - ], - "Transfer-Encoding": [ - "chunked" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Date": [ - "Thu, 20 Jul 2023 08:47:52 GMT" - ], - "Server": [ - "ESF" - ], - "content-length": [ - "97" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI\",\n \"replies\": [\n {}\n ]\n}\n" - } - } - }, - { - "request": { - "method": "DELETE", - "uri": "https://www.googleapis.com/drive/v3/files/1WADX3MU1axnVuqJivovc7d-H4TbTdrIGoxApTWZ4iVI?supportsAllDrives=True", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "Content-Length": [ - "0" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "Content-Type": [ - "text/html" - ], - "Vary": [ - "Origin, X-Origin" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Content-Length": [ - "0" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "Pragma": [ - "no-cache" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Date": [ - "Thu, 20 Jul 2023 08:47:53 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ], - "Server": [ - "ESF" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://www.googleapis.com/drive/v3/files?supportsAllDrives=True", - "body": "{\"name\": \"Test CellTest test_define_named_range\", \"mimeType\": \"application/vnd.google-apps.spreadsheet\"}", - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "Content-Length": [ - "104" - ], - "Content-Type": [ - "application/json" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Server": [ - "ESF" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin, X-Origin" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Pragma": [ - "no-cache" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:21 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ], - "content-length": [ - "191" - ] - }, - "body": { - "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk\",\n \"name\": \"Test CellTest test_define_named_range\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk?includeGridData=false", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:21 GMT" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "content-length": [ - "3335" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk/edit\"\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://www.googleapis.com/drive/v3/files/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk?supportsAllDrives=True&includeItemsFromAllDrives=True&fields=id%2Cname%2CcreatedTime%2CmodifiedTime", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Server": [ - "ESF" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin, X-Origin" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Pragma": [ - "no-cache" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:22 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ], - "content-length": [ - "201" - ] - }, - "body": { - "string": "{\n \"id\": \"1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk\",\n \"name\": \"Test CellTest test_define_named_range\",\n \"createdTime\": \"2023-07-20T08:54:19.159Z\",\n \"modifiedTime\": \"2023-07-20T08:54:19.175Z\"\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk?includeGridData=false", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:22 GMT" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "content-length": [ - "3335" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk/edit\"\n}\n" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk:batchUpdate", - "body": "{\"requests\": [{\"addNamedRange\": {\"namedRange\": {\"name\": \"TestDefineNamedRange\", \"range\": {\"startRowIndex\": 0, \"endRowIndex\": 2, \"startColumnIndex\": 0, \"endColumnIndex\": 2, \"sheetId\": 0}}}}]}", - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "Content-Length": [ - "190" - ], - "Content-Type": [ - "application/json" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:22 GMT" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "content-length": [ - "413" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk\",\n \"replies\": [\n {\n \"addNamedRange\": {\n \"namedRange\": {\n \"namedRangeId\": \"1179381582\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n }\n }\n ]\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk?fields=namedRanges", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:22 GMT" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "content-length": [ - "251" - ] - }, - "body": { - "string": "{\n \"namedRanges\": [\n {\n \"namedRangeId\": \"1179381582\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n ]\n}\n" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk:batchUpdate", - "body": "{\"requests\": [{\"deleteNamedRange\": {\"namedRangeId\": \"1179381582\"}}]}", - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "Content-Length": [ - "68" - ], - "Content-Type": [ - "application/json" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Server": [ - "ESF" - ], "Cache-Control": [ "private" ], "Content-Type": [ "application/json; charset=UTF-8" ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:23 GMT" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "content-length": [ - "97" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk\",\n \"replies\": [\n {}\n ]\n}\n" - } - } - }, - { - "request": { - "method": "DELETE", - "uri": "https://www.googleapis.com/drive/v3/files/1sBAg7oDQBjCGRiV7oaoKUhOcUjW4OEjdK-bN4uMuHlk?supportsAllDrives=True", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-identity-trust-boundary": [ - "0" - ], - "Content-Length": [ - "0" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "Server": [ - "ESF" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "Content-Type": [ - "text/html" - ], - "Vary": [ - "Origin, X-Origin" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Pragma": [ - "no-cache" - ], - "Content-Length": [ - "0" - ], - "Date": [ - "Thu, 20 Jul 2023 08:54:23 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://www.googleapis.com/drive/v3/files?supportsAllDrives=True", - "body": "{\"name\": \"Test CellTest test_define_named_range\", \"mimeType\": \"application/vnd.google-apps.spreadsheet\"}", - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "Content-Length": [ - "104" - ], - "Content-Type": [ - "application/json" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Pragma": [ - "no-cache" - ], - "Date": [ - "Wed, 06 Sep 2023 21:13:24 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ], - "Server": [ - "ESF" - ], - "Vary": [ - "Origin, X-Origin" - ], - "content-length": [ - "191" - ] - }, - "body": { - "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw\",\n \"name\": \"Test CellTest test_define_named_range\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw?includeGridData=false", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "x-l2-request-path": [ - "l2-managed-6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Cache-Control": [ - "private" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Date": [ - "Wed, 06 Sep 2023 21:13:25 GMT" + "X-XSS-Protection": [ + "0" ], "Server": [ "ESF" ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], "content-length": [ - "3335" + "412" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw/edit\"\n}\n" + "string": "{\n \"spreadsheetId\": \"1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4\",\n \"replies\": [\n {\n \"addNamedRange\": {\n \"namedRange\": {\n \"namedRangeId\": \"220755387\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n }\n }\n ]\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw?includeGridData=false", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4?fields=namedRanges", "body": null, "headers": { "User-Agent": [ @@ -1459,55 +335,55 @@ "message": "OK" }, "headers": { - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], "x-l2-request-path": [ "l2-managed-6" ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], "X-Content-Type-Options": [ "nosniff" ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Cache-Control": [ - "private" + "Date": [ + "Sat, 02 Mar 2024 10:34:40 GMT" ], "Transfer-Encoding": [ "chunked" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Date": [ - "Wed, 06 Sep 2023 21:13:25 GMT" - ], - "Server": [ - "ESF" + "X-Frame-Options": [ + "SAMEORIGIN" ], "Vary": [ "Origin", "X-Origin", "Referer" ], + "Cache-Control": [ + "private" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], "content-length": [ - "3335" + "250" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw/edit\"\n}\n" + "string": "{\n \"namedRanges\": [\n {\n \"namedRangeId\": \"220755387\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n ]\n}\n" } } }, { "request": { "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw:batchUpdate", - "body": "{\"requests\": [{\"addNamedRange\": {\"namedRange\": {\"name\": \"TestDefineNamedRange\", \"range\": {\"startRowIndex\": 0, \"endRowIndex\": 2, \"startColumnIndex\": 0, \"endColumnIndex\": 2, \"sheetId\": 0}}}}]}", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4:batchUpdate", + "body": "{\"requests\": [{\"deleteNamedRange\": {\"namedRangeId\": \"220755387\"}}]}", "headers": { "User-Agent": [ "python-requests/2.31.0" @@ -1522,7 +398,7 @@ "keep-alive" ], "Content-Length": [ - "190" + "67" ], "Content-Type": [ "application/json" @@ -1538,54 +414,54 @@ "message": "OK" }, "headers": { - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], "x-l2-request-path": [ "l2-managed-6" ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], "X-Content-Type-Options": [ "nosniff" ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Cache-Control": [ - "private" + "Date": [ + "Sat, 02 Mar 2024 10:34:41 GMT" ], "Transfer-Encoding": [ "chunked" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Date": [ - "Wed, 06 Sep 2023 21:13:26 GMT" - ], - "Server": [ - "ESF" + "X-Frame-Options": [ + "SAMEORIGIN" ], "Vary": [ "Origin", "X-Origin", "Referer" ], + "Cache-Control": [ + "private" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], "content-length": [ - "413" + "97" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw\",\n \"replies\": [\n {\n \"addNamedRange\": {\n \"namedRange\": {\n \"namedRangeId\": \"1124431523\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n }\n }\n ]\n}\n" + "string": "{\n \"spreadsheetId\": \"1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4\",\n \"replies\": [\n {}\n ]\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw?fields=namedRanges", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4?fields=namedRanges", "body": null, "headers": { "User-Agent": [ @@ -1611,55 +487,55 @@ "message": "OK" }, "headers": { - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], "x-l2-request-path": [ "l2-managed-6" ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], "X-Content-Type-Options": [ "nosniff" ], - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "Cache-Control": [ - "private" + "Date": [ + "Sat, 02 Mar 2024 10:34:41 GMT" ], "Transfer-Encoding": [ "chunked" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Date": [ - "Wed, 06 Sep 2023 21:13:26 GMT" - ], - "Server": [ - "ESF" + "X-Frame-Options": [ + "SAMEORIGIN" ], "Vary": [ "Origin", "X-Origin", "Referer" ], + "Cache-Control": [ + "private" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], "content-length": [ - "251" + "3" ] }, "body": { - "string": "{\n \"namedRanges\": [\n {\n \"namedRangeId\": \"1124431523\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n ]\n}\n" + "string": "{}\n" } } }, { "request": { "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw:batchUpdate", - "body": "{\"requests\": [{\"deleteNamedRange\": {\"namedRangeId\": \"1124431523\"}}]}", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4:batchUpdate", + "body": "{\"requests\": [{\"addNamedRange\": {\"namedRange\": {\"name\": \"TestDefineNamedRange\", \"range\": {\"startRowIndex\": 0, \"endRowIndex\": 2, \"startColumnIndex\": 0, \"endColumnIndex\": 2, \"sheetId\": 0}}}}]}", "headers": { "User-Agent": [ "python-requests/2.31.0" @@ -1674,7 +550,7 @@ "keep-alive" ], "Content-Length": [ - "68" + "190" ], "Content-Type": [ "application/json" @@ -1690,54 +566,127 @@ "message": "OK" }, "headers": { - "X-XSS-Protection": [ - "0" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], "x-l2-request-path": [ "l2-managed-6" ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], "X-Content-Type-Options": [ "nosniff" ], - "Content-Type": [ - "application/json; charset=UTF-8" + "Date": [ + "Sat, 02 Mar 2024 10:34:41 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" ], "Cache-Control": [ "private" ], - "Transfer-Encoding": [ - "chunked" + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "content-length": [ + "413" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4\",\n \"replies\": [\n {\n \"addNamedRange\": {\n \"namedRange\": {\n \"namedRangeId\": \"1263226031\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n }\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4?fields=namedRanges", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.31.0" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "x-l2-request-path": [ + "l2-managed-6" ], "Alt-Svc": [ "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" ], + "X-Content-Type-Options": [ + "nosniff" + ], "Date": [ - "Wed, 06 Sep 2023 21:13:27 GMT" + "Sat, 02 Mar 2024 10:34:42 GMT" ], - "Server": [ - "ESF" + "Transfer-Encoding": [ + "chunked" + ], + "X-Frame-Options": [ + "SAMEORIGIN" ], "Vary": [ "Origin", "X-Origin", "Referer" ], + "Cache-Control": [ + "private" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], "content-length": [ - "97" + "251" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw\",\n \"replies\": [\n {}\n ]\n}\n" + "string": "{\n \"namedRanges\": [\n {\n \"namedRangeId\": \"1263226031\",\n \"name\": \"TestDefineNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n ]\n}\n" } } }, { "request": { "method": "DELETE", - "uri": "https://www.googleapis.com/drive/v3/files/1jUBRHm7Ua3uqNNt2Idj2bbEhZhXTQkbrWxEphkT82Hw?supportsAllDrives=True", + "uri": "https://www.googleapis.com/drive/v3/files/1S_BLfCbQDFbROywtjC4LXZO18nIcmpsnVafpKgy0Kl4?supportsAllDrives=True", "body": null, "headers": { "User-Agent": [ @@ -1766,41 +715,41 @@ "message": "No Content" }, "headers": { - "X-XSS-Protection": [ + "Content-Length": [ "0" ], - "X-Frame-Options": [ - "SAMEORIGIN" + "Pragma": [ + "no-cache" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" ], "X-Content-Type-Options": [ "nosniff" ], - "Content-Type": [ - "text/html" + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" + "Date": [ + "Sat, 02 Mar 2024 10:34:43 GMT" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + "X-Frame-Options": [ + "SAMEORIGIN" ], - "Pragma": [ - "no-cache" + "Vary": [ + "Origin, X-Origin" ], - "Date": [ - "Wed, 06 Sep 2023 21:13:27 GMT" + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" + "Content-Type": [ + "text/html" ], - "Content-Length": [ + "X-XSS-Protection": [ "0" ], "Server": [ "ESF" - ], - "Vary": [ - "Origin, X-Origin" ] }, "body": { diff --git a/tests/cassettes/CellTest.test_define_named_range_coordinates.json b/tests/cassettes/CellTest.test_define_named_range_coordinates.json deleted file mode 100644 index 7d5fa05df..000000000 --- a/tests/cassettes/CellTest.test_define_named_range_coordinates.json +++ /dev/null @@ -1,457 +0,0 @@ -{ - "version": 1, - "interactions": [ - { - "request": { - "method": "POST", - "uri": "https://www.googleapis.com/drive/v3/files?supportsAllDrives=True", - "body": "{\"name\": \"Test CellTest test_define_named_range_coordinates\", \"mimeType\": \"application/vnd.google-apps.spreadsheet\"}", - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "Content-Length": [ - "116" - ], - "Content-Type": [ - "application/json" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "X-XSS-Protection": [ - "0" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Server": [ - "ESF" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Vary": [ - "Origin, X-Origin" - ], - "Date": [ - "Wed, 28 Feb 2024 17:28:42 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ], - "content-length": [ - "203" - ] - }, - "body": { - "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"name\": \"Test CellTest test_define_named_range_coordinates\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?includeGridData=false", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "X-XSS-Protection": [ - "0" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Server": [ - "ESF" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "private" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Date": [ - "Wed, 28 Feb 2024 17:28:43 GMT" - ], - "x-l2-request-path": [ - "l2-managed-6" - ], - "content-length": [ - "3347" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range_coordinates\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE/edit\"\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?includeGridData=false", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "X-XSS-Protection": [ - "0" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Server": [ - "ESF" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "private" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Date": [ - "Wed, 28 Feb 2024 17:28:44 GMT" - ], - "x-l2-request-path": [ - "l2-managed-6" - ], - "content-length": [ - "3347" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"properties\": {\n \"title\": \"Test CellTest test_define_named_range_coordinates\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE/edit\"\n}\n" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE:batchUpdate", - "body": "{\"requests\": [{\"addNamedRange\": {\"namedRange\": {\"name\": \"testNamedRange\", \"range\": {\"startRowIndex\": 0, \"endRowIndex\": 2, \"startColumnIndex\": 0, \"endColumnIndex\": 2, \"sheetId\": 0}}}}]}", - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "Content-Length": [ - "184" - ], - "Content-Type": [ - "application/json" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "X-XSS-Protection": [ - "0" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Server": [ - "ESF" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "private" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Date": [ - "Wed, 28 Feb 2024 17:28:44 GMT" - ], - "x-l2-request-path": [ - "l2-managed-6" - ], - "content-length": [ - "407" - ] - }, - "body": { - "string": "{\n \"spreadsheetId\": \"1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE\",\n \"replies\": [\n {\n \"addNamedRange\": {\n \"namedRange\": {\n \"namedRangeId\": \"1051772979\",\n \"name\": \"testNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n }\n }\n ]\n}\n" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?fields=namedRanges", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Content-Type": [ - "application/json; charset=UTF-8" - ], - "X-XSS-Protection": [ - "0" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Server": [ - "ESF" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "private" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Vary": [ - "Origin", - "X-Origin", - "Referer" - ], - "Date": [ - "Wed, 28 Feb 2024 17:28:44 GMT" - ], - "x-l2-request-path": [ - "l2-managed-6" - ], - "content-length": [ - "245" - ] - }, - "body": { - "string": "{\n \"namedRanges\": [\n {\n \"namedRangeId\": \"1051772979\",\n \"name\": \"testNamedRange\",\n \"range\": {\n \"startRowIndex\": 0,\n \"endRowIndex\": 2,\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 2\n }\n }\n ]\n}\n" - } - } - }, - { - "request": { - "method": "DELETE", - "uri": "https://www.googleapis.com/drive/v3/files/1nc0k9MykrNz21DkSCn7bH0ZLyTXVuqmorcjjP1nBavE?supportsAllDrives=True", - "body": null, - "headers": { - "User-Agent": [ - "python-requests/2.31.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ], - "Content-Length": [ - "0" - ], - "authorization": [ - "" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "Content-Length": [ - "0" - ], - "Content-Type": [ - "text/html" - ], - "X-XSS-Protection": [ - "0" - ], - "Pragma": [ - "no-cache" - ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "Server": [ - "ESF" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], - "Vary": [ - "Origin, X-Origin" - ], - "Date": [ - "Wed, 28 Feb 2024 17:28:45 GMT" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" - ] - }, - "body": { - "string": "" - } - } - } - ] -} diff --git a/tests/cell_test.py b/tests/cell_test.py index b618295e0..77242b1eb 100644 --- a/tests/cell_test.py +++ b/tests/cell_test.py @@ -102,7 +102,8 @@ def test_merge_cells(self): @pytest.mark.vcr() def test_define_named_range(self): # define the named range - self.sheet.define_named_range("A1:B2", "TestDefineNamedRange") + range_name = "TestDefineNamedRange" + self.sheet.define_named_range("A1:B2", range_name) # get the ranges from the metadata named_range_dict = self.spreadsheet.fetch_sheet_metadata( @@ -118,7 +119,7 @@ def test_define_named_range(self): named_range = named_range_dict["namedRanges"][0] # ensure all of the properties of the named range match what we expect - self.assertEqual(named_range["name"], "TestDefineNamedRange") + self.assertEqual(named_range["name"], range_name) self.assertEqual(named_range["range"]["startRowIndex"], 0) self.assertEqual(named_range["range"]["endRowIndex"], 2) self.assertEqual(named_range["range"]["startColumnIndex"], 0) @@ -127,11 +128,17 @@ def test_define_named_range(self): # clean up the named range self.sheet.delete_named_range(named_range["namedRangeId"]) - @pytest.mark.vcr() - def test_define_named_range_coordinates(self): - range_name = "testNamedRange" + # ensure the range has been deleted + named_range_dict = self.spreadsheet.fetch_sheet_metadata( + params={"fields": "namedRanges"} + ) + + self.assertEqual(named_range_dict, {}) + + # Add the same range but with index based coordinates self.sheet.define_named_range(1, 1, 2, 2, range_name) + # Check the created named range named_range_dict = self.spreadsheet.fetch_sheet_metadata( params={"fields": "namedRanges"} ) @@ -141,7 +148,15 @@ def test_define_named_range_coordinates(self): self.assertNotEqual(named_range_dict, {}) self.assertIn("namedRanges", named_range_dict) self.assertTrue(len(named_range_dict["namedRanges"]) == 1) - self.assertEqual(named_range_dict["namedRanges"][0]["name"], range_name) + + named_range = named_range_dict["namedRanges"][0] + + # ensure all of the properties of the named range match what we expect + self.assertEqual(named_range["name"], range_name) + self.assertEqual(named_range["range"]["startRowIndex"], 0) + self.assertEqual(named_range["range"]["endRowIndex"], 2) + self.assertEqual(named_range["range"]["startColumnIndex"], 0) + self.assertEqual(named_range["range"]["endColumnIndex"], 2) @pytest.mark.vcr() def test_delete_named_range(self):