Skip to content

Commit

Permalink
[#513] update expected data_attrs error behavior for v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonny Bakker committed Jan 9, 2025
1 parent 1973f76 commit 3994e6d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/objects/tests/v1/test_filters.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from datetime import date, timedelta

from django.utils.translation import gettext as _

from rest_framework import status
from rest_framework.test import APITestCase

Expand Down Expand Up @@ -211,7 +213,12 @@ def test_filter_invalid_param(self):

self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertEqual(
response.json(), ["not enough values to unpack (expected 3, got 2)"]
response.json(),
[
_(
"Filter expression '%(value_part)s' doesn't have the shape 'key__operator__value'"
) % {"value_part": "diameter__exact"}
]
)

def test_filter_nested_attr(self):
Expand Down

0 comments on commit 3994e6d

Please sign in to comment.