Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade Python requirements #283

Merged
merged 2 commits into from
Jun 18, 2024
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
52 changes: 26 additions & 26 deletions edx_exams/apps/lti/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def make_post_request(self, request_body, token):
HTTP_AUTHORIZATION='Bearer {}'.format(token))

# Test that an ACS result is created with the expected type
@ ddt.data(
@ddt.data(
(ExamAttemptStatus.ready_to_start, 200),
(ExamAttemptStatus.started, 200),
(ExamAttemptStatus.ready_to_submit, 200),
Expand All @@ -154,10 +154,10 @@ def make_post_request(self, request_body, token):
(ExamAttemptStatus.rejected, 400),
(ExamAttemptStatus.expired, 400),
)
@ ddt.unpack
@ patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@ patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@ patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
@ddt.unpack
@patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
def test_acs_attempt_status(self,
attempt_status,
expected_response_status,
Expand All @@ -177,9 +177,9 @@ def test_acs_attempt_status(self,

self.assertEqual(response.status_code, expected_response_status)

@ patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@ patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@ patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
@patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
def test_acs_no_attempt_found(self,
mock_get_attempt,
mock_permissions,
Expand All @@ -198,18 +198,18 @@ def test_acs_no_attempt_found(self,

self.assertEqual(response.status_code, 400)

@ ddt.data(
@ddt.data(
('user', ''),
('user', 'sub'),
('resource_link', ''),
('resource_link', 'id'),
('attempt_number', ''),
('action', ''),
)
@ ddt.unpack
@ patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@ patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@ patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
@ddt.unpack
@patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
def test_acs_base_parameter_missing_errors(self,
acs_parameter,
acs_sub_parameter,
Expand Down Expand Up @@ -242,15 +242,15 @@ def test_acs_base_parameter_missing_errors(self,
self.attempt.refresh_from_db()
self.assertEqual(response.data, f'ERROR: required parameter \'{key_to_fail}\' was not found.')

@ ddt.data(
@ddt.data(
['reason_code'],
['incident_time'],
['incident_severity'],
)
@ ddt.unpack
@ patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@ patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@ patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
@ddt.unpack
@patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
def test_acs_terminate_parameter_errors(self,
acs_parameter,
mock_get_attempt,
Expand All @@ -277,9 +277,9 @@ def test_acs_terminate_parameter_errors(self,
self.attempt.refresh_from_db()
self.assertEqual(response.data, f'ERROR: required parameter \'{acs_parameter}\' was not found.')

@ patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@ patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@ patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
@patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
def test_acs_invalid_action(self,
mock_get_attempt,
mock_permissions,
Expand All @@ -301,7 +301,7 @@ def test_acs_invalid_action(self,

self.assertEqual(response.status_code, 400)

@ ddt.data(
@ddt.data(
# Testing reason codes with severity > 0.25
('0', '1.0', 'error'),
('1', '1.0', 'second_review_required'),
Expand All @@ -313,10 +313,10 @@ def test_acs_invalid_action(self,
('1', '0.25', 'verified'),
('1', '0.1', 'verified'),
)
@ ddt.unpack
@ patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@ patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@ patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
@ddt.unpack
@patch.object(Lti1p3ApiAuthentication, 'authenticate', return_value=(AnonymousUser(), None))
@patch('edx_exams.apps.lti.views.LtiProctoringAcsPermissions.has_permission')
@patch('edx_exams.apps.lti.views.get_attempt_for_user_with_attempt_number_and_resource_id')
def test_acs_terminate(self,
reason_code,
incident_severity,
Expand Down
12 changes: 6 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ backports-zoneinfo==0.2.1
# djangorestframework
bleach==6.1.0
# via lti-consumer-xblock
boto3==1.34.123
boto3==1.34.128
# via fs-s3fs
botocore==1.34.123
botocore==1.34.128
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -219,7 +219,7 @@ markupsafe==2.1.5
# xblock
mysqlclient==2.2.4
# via -r requirements/base.in
newrelic==9.10.0
newrelic==9.11.0
# via edx-django-utils
oauthlib==3.2.2
# via
Expand All @@ -235,7 +235,7 @@ openedx-events==9.10.0
# -r requirements/base.in
# edx-event-bus-kafka
# edx-event-bus-redis
openedx-filters==1.8.1
openedx-filters==1.9.0
# via lti-consumer-xblock
packaging==24.1
# via drf-yasg
Expand Down Expand Up @@ -285,7 +285,7 @@ pyyaml==6.0.1
# drf-yasg
# edx-django-release-util
# xblock
redis==5.0.5
redis==5.0.6
# via walrus
requests==2.31.0
# via
Expand Down Expand Up @@ -341,7 +341,7 @@ uritemplate==4.1.1
# via
# coreapi
# drf-yasg
urllib3==1.26.18
urllib3==1.26.19
# via
# botocore
# requests
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ coverage==7.5.3
# via -r requirements/ci.in
distlib==0.3.8
# via virtualenv
filelock==3.14.0
filelock==3.15.1
# via
# tox
# virtualenv
Expand Down
18 changes: 9 additions & 9 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ bleach==6.1.0
# via
# -r requirements/validation.txt
# lti-consumer-xblock
boto3==1.34.123
boto3==1.34.128
# via
# -r requirements/validation.txt
# fs-s3fs
botocore==1.34.123
botocore==1.34.128
# via
# -r requirements/validation.txt
# boto3
Expand Down Expand Up @@ -293,7 +293,7 @@ fastavro==1.9.4
# via
# -r requirements/validation.txt
# openedx-events
filelock==3.14.0
filelock==3.15.1
# via
# -r requirements/validation.txt
# tox
Expand Down Expand Up @@ -428,7 +428,7 @@ more-itertools==10.3.0
# jaraco-functools
mysqlclient==2.2.4
# via -r requirements/validation.txt
newrelic==9.10.0
newrelic==9.11.0
# via
# -r requirements/validation.txt
# edx-django-utils
Expand All @@ -455,7 +455,7 @@ openedx-events==9.10.0
# -r requirements/validation.txt
# edx-event-bus-kafka
# edx-event-bus-redis
openedx-filters==1.8.1
openedx-filters==1.9.0
# via
# -r requirements/validation.txt
# lti-consumer-xblock
Expand Down Expand Up @@ -498,7 +498,7 @@ psutil==5.9.8
# via
# -r requirements/validation.txt
# edx-django-utils
pycodestyle==2.11.1
pycodestyle==2.12.0
# via -r requirements/validation.txt
pycparser==2.22
# via
Expand Down Expand Up @@ -611,7 +611,7 @@ readme-renderer==43.0
# via
# -r requirements/validation.txt
# twine
redis==5.0.5
redis==5.0.6
# via
# -r requirements/validation.txt
# walrus
Expand All @@ -636,7 +636,7 @@ requests-toolbelt==1.0.0
# via
# -r requirements/validation.txt
# twine
responses==0.25.2
responses==0.25.3
# via -r requirements/validation.txt
rfc3986==2.0.0
# via
Expand Down Expand Up @@ -739,7 +739,7 @@ uritemplate==4.1.1
# -r requirements/validation.txt
# coreapi
# drf-yasg
urllib3==1.26.18
urllib3==1.26.19
# via
# -r requirements/validation.txt
# botocore
Expand Down
16 changes: 8 additions & 8 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ bleach==6.1.0
# via
# -r requirements/test.txt
# lti-consumer-xblock
boto3==1.34.123
boto3==1.34.128
# via
# -r requirements/test.txt
# fs-s3fs
botocore==1.34.123
botocore==1.34.128
# via
# -r requirements/test.txt
# boto3
Expand Down Expand Up @@ -289,7 +289,7 @@ fastavro==1.9.4
# via
# -r requirements/test.txt
# openedx-events
filelock==3.14.0
filelock==3.15.1
# via
# -r requirements/test.txt
# tox
Expand Down Expand Up @@ -406,7 +406,7 @@ more-itertools==10.3.0
# jaraco-functools
mysqlclient==2.2.4
# via -r requirements/test.txt
newrelic==9.10.0
newrelic==9.11.0
# via
# -r requirements/test.txt
# edx-django-utils
Expand All @@ -431,7 +431,7 @@ openedx-events==9.10.0
# -r requirements/test.txt
# edx-event-bus-kafka
# edx-event-bus-redis
openedx-filters==1.8.1
openedx-filters==1.9.0
# via
# -r requirements/test.txt
# lti-consumer-xblock
Expand Down Expand Up @@ -569,7 +569,7 @@ pyyaml==6.0.1
# xblock
readme-renderer==43.0
# via twine
redis==5.0.5
redis==5.0.6
# via
# -r requirements/test.txt
# walrus
Expand All @@ -593,7 +593,7 @@ requests-oauthlib==2.0.0
# social-auth-core
requests-toolbelt==1.0.0
# via twine
responses==0.25.2
responses==0.25.3
# via -r requirements/test.txt
restructuredtext-lint==1.4.0
# via doc8
Expand Down Expand Up @@ -706,7 +706,7 @@ uritemplate==4.1.1
# -r requirements/test.txt
# coreapi
# drf-yasg
urllib3==1.26.18
urllib3==1.26.19
# via
# -r requirements/test.txt
# botocore
Expand Down
12 changes: 6 additions & 6 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ bleach==6.1.0
# via
# -r requirements/base.txt
# lti-consumer-xblock
boto3==1.34.123
boto3==1.34.128
# via
# -r requirements/base.txt
# django-ses
# fs-s3fs
botocore==1.34.123
botocore==1.34.128
# via
# -r requirements/base.txt
# boto3
Expand Down Expand Up @@ -293,7 +293,7 @@ mysqlclient==2.2.4
# via
# -r requirements/base.txt
# -r requirements/production.in
newrelic==9.10.0
newrelic==9.11.0
# via
# -r requirements/base.txt
# edx-django-utils
Expand All @@ -316,7 +316,7 @@ openedx-events==9.10.0
# -r requirements/base.txt
# edx-event-bus-kafka
# edx-event-bus-redis
openedx-filters==1.8.1
openedx-filters==1.9.0
# via
# -r requirements/base.txt
# lti-consumer-xblock
Expand Down Expand Up @@ -394,7 +394,7 @@ pyyaml==6.0.1
# drf-yasg
# edx-django-release-util
# xblock
redis==5.0.5
redis==5.0.6
# via
# -r requirements/base.txt
# walrus
Expand Down Expand Up @@ -473,7 +473,7 @@ uritemplate==4.1.1
# -r requirements/base.txt
# coreapi
# drf-yasg
urllib3==1.26.18
urllib3==1.26.19
# via
# -r requirements/base.txt
# botocore
Expand Down
Loading
Loading