MCPcopy
hub / github.com/burnash/gspread / test_batch_get

Method test_batch_get

tests/worksheet_test.py:1481–1496  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1479
1480 @pytest.mark.vcr()
1481 def test_batch_get(self):
1482 values = [
1483 ["A1", "B1", "", "D1"],
1484 ["", "b2", "", ""],
1485 ["", "", "", ""],
1486 ["A4", "B4", "", "D4"],
1487 ]
1488
1489 self.sheet.update(values, "A1")
1490
1491 value_ranges = self.sheet.batch_get(["A1:B1", "B4:D4"])
1492
1493 self.assertEqual(value_ranges, [[["A1", "B1"]], [["B4", "", "D4"]]])
1494 self.assertEqual(value_ranges[0].range, "Sheet1!A1:B1")
1495 self.assertEqual(value_ranges[1].range, "Sheet1!B4:D4")
1496 self.assertEqual(value_ranges[0].first(), "A1")
1497
1498 @pytest.mark.vcr()
1499 def test_cell_return_first(self):

Callers

nothing calls this directly

Calls 3

updateMethod · 0.80
batch_getMethod · 0.80
firstMethod · 0.80

Tested by

no test coverage detected