]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Expanded SQLite check constrait reflection case with constraint name that includes...
authorJeff Horemans <jeff.horemans@vortex-financials.be>
Thu, 8 Aug 2024 08:44:07 +0000 (10:44 +0200)
committerJeff Horemans <jeff.horemans@vortex-financials.be>
Thu, 8 Aug 2024 08:44:07 +0000 (10:44 +0200)
test/dialect/test_sqlite.py

index 98de6e356051d2da019c5faa78fb263ddb04239b..a479b63ad39bded83357234d31a30d63aff5c4e1 100644 (file)
@@ -1821,8 +1821,8 @@ class ConstraintReflectionTest(fixtures.TestBase):
                   CheckConstraint("id > 0"),
                   # Constraint definition with newline and tab characters
                   CheckConstraint("((value > 0) AND \n\t(value < 100) AND \n\t(value != 50))", name='ck_r_value_multiline'),
-                  # Constraint name with special characters and spaces.
-                  CheckConstraint("value IS NOT NULL", name='^ck-r* # Value'),
+                  # Constraint name with special characters.
+                  CheckConstraint("value IS NOT NULL", name="^ck-r* #\n\t"),
                   # Constraint definition with special characters.
                   CheckConstraint("prefix NOT GLOB '*[^-. /#,]*'")
             )
@@ -2471,7 +2471,7 @@ class ConstraintReflectionTest(fixtures.TestBase):
         eq_(
             inspector.get_check_constraints("r"),
             [
-                {"sqltext": "value IS NOT NULL", "name": "^ck-r* # Value"},
+                {"sqltext": "value IS NOT NULL", "name": "^ck-r* #\n\t"},
                 {"sqltext": "((value > 0) AND \n\t(value < 100) AND \n\t(value != 50))", "name": "ck_r_value_multiline"},
                 {"sqltext": "id > 0", "name": None},
                 {"sqltext": "prefix NOT GLOB '*[^-. /#,]*'", "name": None},