Skip to content

Commit

Permalink
Merge pull request #527 from edx/ziafazal/revert-ENT-2009-b
Browse files Browse the repository at this point in the history
Revert Changed page size of SAPSF inactive user results from 500 to 1000
  • Loading branch information
ziafazal authored Jul 17, 2019
2 parents 558e3e4 + e0e525d commit 3c7683c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Change Log
Unreleased
----------

[1.7.1] - 2019-07-15
--------------------

* Reverted page size of SAPSF inactive user results from 1000 to 500

[1.7.0] - 2019-07-15
--------------------

Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

from __future__ import absolute_import, unicode_literals

__version__ = "1.7.0"
__version__ = "1.7.1"

default_app_config = "enterprise.apps.EnterpriseConfig" # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion integrated_channels/sap_success_factors/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def get_inactive_sap_learners(self):
all_inactive_learners = self._call_search_students_recursively(
sap_search_student_url,
all_inactive_learners=[],
page_size=1000,
page_size=500,
start_at=0
)
return all_inactive_learners
Expand Down
14 changes: 7 additions & 7 deletions tests/test_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def setUp(self):
self.search_student_paginated_url = '{sap_search_student_url}&{pagination_criterion}'.format(
sap_search_student_url=self.sap_search_student_url,
pagination_criterion='$count=true&$top={page_size}&$skip={start_at}'.format(
page_size=1000,
page_size=500,
start_at=0,
),
)
Expand Down Expand Up @@ -954,13 +954,13 @@ def mock_get_user_social_auth(*args):
search_student_paginated_url = '{sap_search_student_url}&{pagination_criterion}'.format(
sap_search_student_url=self.sap_search_student_url,
pagination_criterion='$count=true&$top={page_size}&$skip={start_at}'.format(
page_size=1000,
start_at=1000 * response_page,
page_size=500,
start_at=500 * response_page,
)
)
sapsf_search_student_response = {
u'@odata.metadataEtag': u'W/"17090d86-20fa-49c8-8de0-de1d308c8b55"',
u"@odata.count": 1000 * len(inactive_sap_learners),
u"@odata.count": 500 * len(inactive_sap_learners),
u'value': [{'studentID': inactive_learner}]
}
responses.add(
Expand All @@ -973,11 +973,11 @@ def mock_get_user_social_auth(*args):

expected_messages = [
'Processing learners to unlink inactive users using configuration: [{}]'.format(self.sapsf),
'SAP SF searchStudent API returned [1] inactive learners of total [3000] starting from [0] for '
'SAP SF searchStudent API returned [1] inactive learners of total [1500] starting from [0] for '
'enterprise customer [{}]'.format(self.enterprise_customer.name),
'SAP SF searchStudent API returned [1] inactive learners of total [3000] starting from [1000] for '
'SAP SF searchStudent API returned [1] inactive learners of total [1500] starting from [500] for '
'enterprise customer [{}]'.format(self.enterprise_customer.name),
'SAP SF searchStudent API returned [1] inactive learners of total [3000] starting from [2000] for '
'SAP SF searchStudent API returned [1] inactive learners of total [1500] starting from [1000] for '
'enterprise customer [{}]'.format(self.enterprise_customer.name),
'Found [{}] SAP inactive learners for enterprise customer [{}]'.format(
len(inactive_sap_learners), self.enterprise_customer.name
Expand Down

0 comments on commit 3c7683c

Please sign in to comment.