]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Correct mock call from 5de0f1cf50
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Jul 2020 14:48:03 +0000 (10:48 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Jul 2020 14:48:03 +0000 (10:48 -0400)
mock in python 2.7 / 3.8 seems to have an "args" accessor
but in prior python 3 versions this is not the case,
so this is likely a recent addition to "mock" but wasn't
present in the python3 vendored versions.

Change-Id: Iff8afe75e891c9658c7c7b577831fefd5986940b

test/orm/test_query.py

index 4862542077cd39e0843ccfef37feba044337ca9b..93d1e88a5aedef150bc92a4eb1a694645441a747 100644 (file)
@@ -934,7 +934,7 @@ class GetTest(QueryTest):
         s.execute(stmt)
 
         eq_(
-            m1.mock_calls[0].args[0].load_options,
+            m1.mock_calls[0][1][0].load_options,
             QueryContext.default_load_options(
                 _autoflush=False, _populate_existing=True, _yield_per=10
             ),