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

xfail pytz test_invalid_inputs() on Django >= v5.0 #9344

Closed
wants to merge 3 commits into from
Closed
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
6 changes: 2 additions & 4 deletions docs/api-guide/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down
2 changes: 2 additions & 0 deletions tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from unittest.mock import patch

import pytest
from django import VERSION as DJANGO_VERSION

try:
import pytz
Expand Down Expand Up @@ -672,6 +673,7 @@ def test_valid_inputs(self, *args):
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it'll skip a whole load of tests regardless of if pytz is relevant to that particular test case or not.

def test_invalid_inputs(self, *args):
"""
Ensure that invalid values raise the expected validation error.
Expand Down
Loading