]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Backref cascade warning test checks links
authorStephen Rosen <sirosen@globus.org>
Fri, 16 Apr 2021 16:17:35 +0000 (16:17 +0000)
committerStephen Rosen <sirosen@globus.org>
Fri, 7 May 2021 15:59:59 +0000 (15:59 +0000)
This is a deprecation test which already ensures that a warning si
emitted whenever a backref-cascade takes place.
Expand the text which it checks to include the two links which should
be appended to the message in this case.

test/orm/test_cascade.py

index 879ae2993aab423d822e3cb1193ac16c5d4e60e8..7a1ac35576004b647990030cc5d3d5c1c0978f37 100644 (file)
@@ -1394,6 +1394,10 @@ class NoSaveCascadeFlushTest(_fixtures.FixtureTest):
             with testing.expect_deprecated(
                 '"Address" object is being merged into a Session along '
                 'the backref cascade path for relationship "User.addresses"'
+                # link added to this specific warning
+                r".*Background on this error at: http://sqlalche.me/e/14/s9r1"
+                # link added to all RemovedIn20Warnings
+                r".*Background on SQLAlchemy 2.0 at: http://sqlalche.me/e/b8d9"
             ):
                 a1.user = u1
             sess.add(a1)