Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 0 additions & 4 deletions 4 tableauserverclient/server/pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ def __init__(self, endpoint, request_opts=None):
self._count = 0
self._options = RequestOptions()

# Pager assumes deterministic order but solr doesn't guarantee sort order unless specified
if not self._options.sort:
self._options.sort.add(Sort(RequestOptions.Field.Name, RequestOptions.Direction.Asc))

def __iter__(self):
# Fetch the first page
current_item_list, last_pagination_item = self._endpoint(self._options)
Expand Down
2 changes: 1 addition & 1 deletion 2 test/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_populate_users(self):
with open(POPULATE_USERS, 'rb') as f:
response_xml = f.read().decode('utf-8')
with requests_mock.mock() as m:
m.get(self.baseurl + '/e7833b48-c6f7-47b5-a2a7-36e7dd232758/users?pageNumber=1&pageSize=100&sort=name:asc',
m.get(self.baseurl + '/e7833b48-c6f7-47b5-a2a7-36e7dd232758/users?pageNumber=1&pageSize=100',
text=response_xml, complete_qs=True)
single_group = TSC.GroupItem(name='Test Group')
single_group._id = 'e7833b48-c6f7-47b5-a2a7-36e7dd232758'
Expand Down
8 changes: 4 additions & 4 deletions 8 test/test_pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def test_pager_with_options(self):
page_3 = f.read().decode('utf-8')
with requests_mock.mock() as m:
# Register Pager with some pages
m.get(self.baseurl + "?pageNumber=1&pageSize=1&sort=name:asc", complete_qs=True, text=page_1)
m.get(self.baseurl + "?pageNumber=2&pageSize=1&sort=name:asc", complete_qs=True, text=page_2)
m.get(self.baseurl + "?pageNumber=3&pageSize=1&sort=name:asc", complete_qs=True, text=page_3)
m.get(self.baseurl + "?pageNumber=1&pageSize=3&sort=name:asc", complete_qs=True, text=page_1)
m.get(self.baseurl + "?pageNumber=1&pageSize=1", complete_qs=True, text=page_1)
m.get(self.baseurl + "?pageNumber=2&pageSize=1", complete_qs=True, text=page_2)
m.get(self.baseurl + "?pageNumber=3&pageSize=1", complete_qs=True, text=page_3)
m.get(self.baseurl + "?pageNumber=1&pageSize=3", complete_qs=True, text=page_1)

# Starting on page 2 should get 2 out of 3
opts = TSC.RequestOptions(2, 1)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.