GitHub Actions: Run tests_with_pytz_installed

This commit is contained in:
Christian Clauss 2024-03-23 08:56:12 +01:00
parent f4194c4684
commit f7c431bc0c
4 changed files with 6 additions and 4 deletions

View File

@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- '3.6'

View File

@ -75,11 +75,9 @@ from rest_framework.response import Response
@cache_page(60 * 15)
@vary_on_cookie
@api_view(['GET'])
@api_view(["GET"])
def get_user_list(request):
content = {
'user_feed': request.user.get_user_feed()
}
content = {"user_feed": request.user.get_user_feed()}
return Response(content)
```

View File

@ -2,6 +2,7 @@
pytest>=7.0.1,<8.0
pytest-cov>=4.0.0,<5.0
pytest-django>=4.5.2,<5.0
pytz
importlib-metadata<5.0
# temporary pin of attrs
attrs==22.1.0

View File

@ -9,6 +9,7 @@ from enum import auto
from unittest.mock import patch
import pytest
from django import VERSION as DJANGO_VERSION
try:
import pytz
@ -672,6 +673,7 @@ class FieldValues:
assert self.field.run_validation(input_value) == expected_output, \
'input value: {}'.format(repr(input_value))
@pytest.mark.xfail(pytz and DJANGO_VERSION >= (5, 0), reason="Django v5 drops support for pytz")
def test_invalid_inputs(self, *args):
"""
Ensure that invalid values raise the expected validation error.