]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- repair these tests to use the global manager_of_class fn,
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 7 Jun 2015 21:44:58 +0000 (17:44 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 7 Jun 2015 21:44:58 +0000 (17:44 -0400)
as test_customfinder_pass at least does not provide the
alternate ext manager and in all cases it's the global function
that counts

test/ext/test_extendedattr.py

index 653418ac4007d57758399faab2b31e728de0b167..c4147ed8539e2d37659fec55b7b62019eece7bbd 100644 (file)
@@ -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)