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

[vuln patch] Bump certifi and djangorestframework #679

Merged
merged 9 commits into from
Jul 15, 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
13 changes: 11 additions & 2 deletions api/internal/tests/views/test_owner_viewset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest.mock import patch

from rest_framework import status
from rest_framework.exceptions import ErrorDetail
from rest_framework.reverse import reverse
from rest_framework.test import APITestCase

Expand Down Expand Up @@ -50,11 +51,19 @@ def test_retrieve_returns_owner_with_period_username(self):
def test_retrieve_returns_404_if_no_matching_username(self):
response = self._retrieve(kwargs={"service": "github", "owner_username": "fff"})
assert response.status_code == status.HTTP_404_NOT_FOUND
assert response.data == {"detail": "Not found."}
assert response.data == {
"detail": ErrorDetail(
string="No Owner matches the given query.", code="not_found"
)
}

def test_retrieve_owner_unknown_service_returns_404(self):
response = self._retrieve(
kwargs={"service": "not-real", "owner_username": "anything"}
)
assert response.status_code == status.HTTP_404_NOT_FOUND
assert response.data == {"detail": "Service not found: not-real"}
assert response.data == {
"detail": ErrorDetail(
string="Service not found: not-real", code="not_found"
)
}
7 changes: 6 additions & 1 deletion api/public/v2/tests/test_api_owner_viewset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from rest_framework import status
from rest_framework.exceptions import ErrorDetail
from rest_framework.reverse import reverse
from rest_framework.test import APITestCase

Expand Down Expand Up @@ -37,7 +38,11 @@ def test_retrieve_returns_owner_with_period_username(self):
def test_retrieve_returns_404_if_no_matching_username(self):
response = self._retrieve(kwargs={"service": "github", "owner_username": "fff"})
assert response.status_code == status.HTTP_404_NOT_FOUND
assert response.data == {"detail": "Not found."}
assert response.data == {
"detail": ErrorDetail(
string="No Owner matches the given query.", code="not_found"
)
}

def test_retrieve_owner_unknown_service_returns_404(self):
response = self._retrieve(
Expand Down
3 changes: 2 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ django-filter
django-model-utils
django-postgres-extra>=2.0.8
django-prometheus
djangorestframework
djangorestframework==3.15.2
drf-spectacular
drf-spectacular-sidecar
elastic-apm
Expand Down Expand Up @@ -54,3 +54,4 @@ vcrpy
whitenoise
django-autocomplete-light
django-better-admin-arrayfield
certifi>=2024.07.04
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ cerberus==1.3.2
# via
# -r requirements.in
# shared
certifi==2023.7.22
certifi==2024.7.4
# via
# -r requirements.in
# elastic-apm
# httpcore
# httpx
Expand Down Expand Up @@ -148,7 +149,7 @@ django-prometheus==2.3.1
# via
# -r requirements.in
# shared
djangorestframework==3.14.0
djangorestframework==3.15.2
# via
# -r requirements.in
# drf-spectacular
Expand Down Expand Up @@ -377,7 +378,6 @@ python-redis-lock==4.0.0
pytz==2022.1
# via
# -r requirements.in
# djangorestframework
# shared
pyyaml==6.0.1
# via
Expand Down
Loading