Skip to content

Commit

Permalink
read multiple keys with index (#4386)
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelnucfin authored Dec 5, 2017
1 parent 38d4640 commit 3fb9f16
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spanner/tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,19 @@ def test_empty_read_with_single_keys_index(self):
rows = list(results_iter)
self.assertEqual(rows, [])

def test_read_with_multiple_keys_index(self):
row_count = 10
columns = self.COLUMNS[1], self.COLUMNS[2]
session, committed = self._set_up_table(row_count)
self.to_delete.append(session)
expected = [[row[1], row[2]] for row in self._row_data(row_count)]
rows = list(session.read(self.TABLE,
columns,
KeySet(keys=expected),
index='name')
)
self.assertEqual(rows, expected)

def test_snapshot_read_w_various_staleness(self):
from datetime import datetime
from google.cloud._helpers import UTC
Expand Down

0 comments on commit 3fb9f16

Please sign in to comment.