summaryrefslogtreecommitdiff
path: root/tests/backends/postgresql/test_features.py
blob: c63f26a7bb132aa51f81102a86112038e725a9cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import unittest

from django.db import connection
from django.test import TestCase


@unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL tests")
class FeaturesTests(TestCase):
    def test_max_query_params_respects_server_side_params(self):
        if connection.features.uses_server_side_binding:
            limit = 2**16 - 1
        else:
            limit = None
        self.assertEqual(connection.features.max_query_params, limit)