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

[pre-commit.ci] pre-commit autoupdate #192

Merged
merged 2 commits into from
Feb 6, 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
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
Loading