Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent 5287d97 commit cd71b35
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions examples/jupyterhub_config_lti11.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Example JupyterHub configuration file with LTI 1.1 settings. """

import os

# Set port and IP
Expand Down
1 change: 1 addition & 0 deletions examples/jupyterhub_config_lti13.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Example JupyterHub configuration file with LTI 1.3 settings. """

import os

# Set port and IP
Expand Down
1 change: 1 addition & 0 deletions tests/lti13/stash_of_unused_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
These fixtures are not used but kept as they may be relevant to use in the
future.
"""

from typing import Any, Callable, Dict

import jwt
Expand Down
1 change: 1 addition & 0 deletions tests/lti13/test_lti13_authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
We have dedicated tests of LTI13LaunchValidator's methods in
test_lti13_validator.py.
"""

from unittest.mock import patch

import pytest
Expand Down
12 changes: 6 additions & 6 deletions tests/lti13/test_lti13_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,19 @@ def test_validate_launch_request_empty_roles(launch_req_jwt_decoded):

def test_validate_launch_request_invalid_message_type(launch_req_jwt_decoded):
validator = LTI13LaunchValidator()
launch_req_jwt_decoded[
"https://purl.imsglobal.org/spec/lti/claim/message_type"
] = "???"
launch_req_jwt_decoded["https://purl.imsglobal.org/spec/lti/claim/message_type"] = (
"???"
)

with pytest.raises(IncorrectValueError):
validator.validate_id_token(launch_req_jwt_decoded)


def test_validate_launch_request_invalid_version(launch_req_jwt_decoded):
validator = LTI13LaunchValidator()
launch_req_jwt_decoded[
"https://purl.imsglobal.org/spec/lti/claim/version"
] = "1.0.0"
launch_req_jwt_decoded["https://purl.imsglobal.org/spec/lti/claim/version"] = (
"1.0.0"
)

with pytest.raises(IncorrectValueError):
validator.validate_id_token(launch_req_jwt_decoded)
Expand Down

0 comments on commit cd71b35

Please sign in to comment.