Skip to content

Commit

Permalink
chore: bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
julienc91 committed Oct 27, 2024
1 parent 8a6663d commit f252d6e
Show file tree
Hide file tree
Showing 6 changed files with 743 additions and 799 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_stages: [commit]

repos:
- repo: https://github.com/Woile/commitizen
rev: v3.29.0
rev: v3.30.0
hooks:
- id: commitizen
stages: [commit-msg]
Expand All @@ -28,15 +28,15 @@ repos:
stages: [commit, push]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.7.1
hooks:
- id: ruff
args: [--fix, --config=backend/pyproject.toml]
- id: ruff-format
args: [--config=backend/pyproject.toml]

- repo: https://github.com/gitguardian/ggshield
rev: v1.31.0
rev: v1.32.2
hooks:
- id: ggshield
language_version: python3
Expand Down
27 changes: 21 additions & 6 deletions backend/caviardeul/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from pathlib import Path

import httpx
import pytest
from django.core.cache import cache

Expand All @@ -23,9 +24,16 @@ def inner(
content: str,
):
httpx_mock.add_response(
url=(
"https://fr.wikipedia.org/w/api.php?action=parse&format=json&"
f"page={page_id}&prop=text&formatversion=2&origin=*"
url=httpx.URL(
"https://fr.wikipedia.org/w/api.php",
params={
"action": "parse",
"format": "json",
"prop": "text",
"formatversion": 2,
"origin": "*",
"page": page_id,
},
),
json={"parse": {"title": title, "text": content}},
)
Expand All @@ -37,9 +45,16 @@ def inner(
def mock_wiki_api_error(httpx_mock):
def inner(page_id: str):
httpx_mock.add_response(
url=(
"https://fr.wikipedia.org/w/api.php?action=parse&format=json&"
f"page={page_id}&prop=text&formatversion=2&origin=*"
url=httpx.URL(
"https://fr.wikipedia.org/w/api.php",
params={
"action": "parse",
"format": "json",
"prop": "text",
"formatversion": 2,
"origin": "*",
"page": page_id,
},
),
json={"error": "unknown article"},
)
Expand Down
1 change: 1 addition & 0 deletions backend/caviardeul/tests/views/test_custom_article.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def test_get_invalid_custom_article(self, mock_wiki_api_error, client):
assert res.status_code == 400, res.content


@pytest.mark.httpx_mock(can_send_already_matched_responses=True)
class TestCreateCustomArticle:
@pytest.mark.parametrize("authenticated", [True, False])
def test_create_custom_article(self, mock_wiki_api, client, authenticated):
Expand Down
6 changes: 3 additions & 3 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ requires-python = ">=3.11"
dependencies = [
"django ~= 5.0",
"gunicorn ~= 23.0",
"uvicorn ~= 0.30.1",
"uvicorn ~= 0.32.0",
"psycopg[binary] ~= 3.2.1",
"django-ninja ~= 1.3.0",
"httpx ~= 0.27.0",
"cryptography ~= 43.0",
"beautifulsoup4 ~= 4.12.3",
"django-cors-headers ~= 4.4.0",
"redis ~= 5.0.7",
"django-cors-headers ~= 4.5.0",
"redis ~= 5.2.0",
"pydantic ~= 2.9.0",
"sentry-sdk[django]",
"django-import-export>=4.2.0",
Expand Down
Loading

0 comments on commit f252d6e

Please sign in to comment.