Jelajahi Sumber

Refs #35842 -- Fixed test_lookups_special_chars_double_quotes on SQLite 3.47+.

Sage Abdullah 3 bulan lalu
induk
melakukan
47eafd139b
1 mengubah file dengan 10 tambahan dan 4 penghapusan
  1. 10 4
      django/db/backends/sqlite3/features.py

+ 10 - 4
django/db/backends/sqlite3/features.py

@@ -50,10 +50,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
         # The django_format_dtdelta() function doesn't properly handle mixed
         # Date/DateTime fields and timedeltas.
         "expressions.tests.FTimeDeltaTests.test_mixed_comparisons1",
-        # SQLite doesn't parse escaped double quotes in the JSON path notation,
-        # so it cannot match keys that contains double quotes (#35842).
-        "model_fields.test_jsonfield.TestQuerying."
-        "test_lookups_special_chars_double_quotes",
     }
     create_test_table_with_composite_primary_key = """
         CREATE TABLE test_table_composite_pk (
@@ -127,6 +123,16 @@ class DatabaseFeatures(BaseDatabaseFeatures):
                     },
                 }
             )
+        if Database.sqlite_version_info < (3, 47):
+            skips.update(
+                {
+                    "SQLite does not parse escaped double quotes in the JSON path "
+                    "notation": {
+                        "model_fields.test_jsonfield.TestQuerying."
+                        "test_lookups_special_chars_double_quotes",
+                    },
+                }
+            )
         return skips
 
     @cached_property