Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Convert simple_select_list and simple_select_list_txn to return lists of tuples #16505

Merged
merged 7 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/storage/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def test_select_one_missing(
@defer.inlineCallbacks
def test_select_list(self) -> Generator["defer.Deferred[object]", object, None]:
self.mock_txn.rowcount = 3
self.mock_txn.__iter__ = Mock(return_value=iter([(1,), (2,), (3,)]))
self.mock_txn.fetchall.return_value = [(1,), (2,), (3,)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To check: I think that this is needed because we've changed the implementation to use fetchall (rather than a dictionary comprehension that loops over the psycopg cursor). Do I understand correctly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly! 👍

self.mock_txn.description = (("colA", None, None, None, None, None, None),)

ret = yield defer.ensureDeferred(
Expand Down
Loading