From: Mike Bayer Date: Sun, 7 Jun 2015 21:44:58 +0000 (-0400) Subject: - repair these tests to use the global manager_of_class fn, X-Git-Tag: rel_1_0_5~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=343734b95f910cf04ef4a8d50d30b0526451f960;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - repair these tests to use the global manager_of_class fn, as test_customfinder_pass at least does not provide the alternate ext manager and in all cases it's the global function that counts --- diff --git a/test/ext/test_extendedattr.py b/test/ext/test_extendedattr.py index 653418ac40..c4147ed853 100644 --- a/test/ext/test_extendedattr.py +++ b/test/ext/test_extendedattr.py @@ -9,7 +9,7 @@ from sqlalchemy.orm.instrumentation import is_instrumented from sqlalchemy.orm import clear_mappers from sqlalchemy.testing import fixtures from sqlalchemy.ext import instrumentation -from sqlalchemy.orm.instrumentation import register_class +from sqlalchemy.orm.instrumentation import register_class, manager_of_class from sqlalchemy.testing.util import decorator from sqlalchemy.orm import events from sqlalchemy import event @@ -465,7 +465,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest): register_class(A) eq_( - type(instrumentation.manager_of_class(A)), + type(manager_of_class(A)), instrumentation.ClassManager) def test_nativeext_interfaceexact(self): @@ -475,7 +475,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest): register_class(A) ne_( - type(instrumentation.manager_of_class(A)), + type(manager_of_class(A)), instrumentation.ClassManager) def test_nativeext_submanager(self): @@ -486,7 +486,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest): __sa_instrumentation_manager__ = Mine register_class(A) - eq_(type(instrumentation.manager_of_class(A)), Mine) + eq_(type(manager_of_class(A)), Mine) @modifies_instrumentation_finders def test_customfinder_greedy(self): @@ -501,7 +501,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest): instrumentation.instrumentation_finders.insert(0, find) register_class(A) - eq_(type(instrumentation.manager_of_class(A)), Mine) + eq_(type(manager_of_class(A)), Mine) @modifies_instrumentation_finders def test_customfinder_pass(self): @@ -513,8 +513,9 @@ class FinderTest(_ExtBase, fixtures.ORMTest): instrumentation.instrumentation_finders.insert(0, find) register_class(A) + eq_( - type(instrumentation.manager_of_class(A)), + type(manager_of_class(A)), instrumentation.ClassManager)