mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 01:20:02 +03:00
Put declaration in test class
This commit is contained in:
parent
504530aee2
commit
956502757a
|
@ -690,7 +690,9 @@ class SensitiveOrderingFilterTests(TestCase):
|
|||
]
|
||||
|
||||
|
||||
if postgres_fields:
|
||||
@pytest.mark.skipif('not postgres_fields')
|
||||
class JSONOrderingFilterTests(TestCase):
|
||||
def test_order_by_json_field(self):
|
||||
class JSONOrderingFilterModel(models.Model):
|
||||
data = postgres_fields.JSONField()
|
||||
|
||||
|
@ -700,11 +702,6 @@ if postgres_fields:
|
|||
model = JSONOrderingFilterModel
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
@pytest.mark.skipif(postgres_fields is None, reason='not a postgresql database')
|
||||
class JSONOrderingFilterTests(TestCase):
|
||||
def test_order_by_json_field(self):
|
||||
|
||||
class OrderingListView(generics.ListAPIView):
|
||||
queryset = JSONOrderingFilterModel.objects.all()
|
||||
serializer_class = JSONOrderingFilterSerializer
|
||||
|
|
Loading…
Reference in New Issue
Block a user