Skip to content

Commit

Permalink
Merge pull request #192 from jupyterhub/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
consideRatio authored Feb 6, 2024
2 parents 12f9701 + cd71b35 commit 2ba99ce
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:

# Autoformat: Python code
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
# args are not passed, but see the config in pyproject.toml
Expand Down Expand Up @@ -48,7 +48,7 @@ repos:

# Lint: Python code
- repo: https://github.com/PyCQA/flake8
rev: "6.1.0"
rev: "7.0.0"
hooks:
- id: flake8

Expand Down
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 2ba99ce

Please sign in to comment.