summaryrefslogtreecommitdiff
path: root/tests/backends/sqlite/test_features.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/backends/sqlite/test_features.py')
-rw-r--r--tests/backends/sqlite/test_features.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/backends/sqlite/test_features.py b/tests/backends/sqlite/test_features.py
index 95e060fbcc..45c3ec9f2c 100644
--- a/tests/backends/sqlite/test_features.py
+++ b/tests/backends/sqlite/test_features.py
@@ -1,3 +1,4 @@
+import copy
import sqlite3
from unittest import mock, skipUnless
@@ -29,3 +30,13 @@ class FeaturesTests(TestCase):
finally:
connection.connection.setlimit(limit_name, current_limit)
self.assertEqual(connection.features.max_query_params, current_limit)
+
+ def test_max_query_params_without_established_connection(self):
+ new_connection = connection.copy()
+ new_connection.settings_dict = copy.deepcopy(connection.settings_dict)
+ self.assertIsNone(new_connection.connection)
+ try:
+ result = new_connection.features.max_query_params
+ self.assertIsInstance(result, int)
+ finally:
+ new_connection._close()