summaryrefslogtreecommitdiff
path: root/test/engine/test_reflection.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-02-01 18:21:04 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-02-01 18:21:04 -0500
commit5b0919f3f5c7678c587858a47e38acd4a5b82f25 (patch)
tree236ff9c4c4e8688aa9b1b5b5a9ea7f20ea3807fd /test/engine/test_reflection.py
parent32a1db368599f6f3dbb3765ef5f11640d1725672 (diff)
downloadsqlalchemy-5b0919f3f5c7678c587858a47e38acd4a5b82f25.tar.gz
- Added a new feature which allows automated naming conventions to be
applied to :class:`.Constraint` and :class:`.Index` objects. Based on a recipe in the wiki, the new feature uses schema-events to set up names as various schema objects are associated with each other. The events then expose a configuration system through a new argument :paramref:`.MetaData.naming_convention`. This system allows production of both simple and custom naming schemes for constraints and indexes on a per-:class:`.MetaData` basis. [ticket:2923] commit 7e65e52c086652de3dd3303c723f98f09af54db8 Author: Mike Bayer <mike_mp@zzzcomputing.com> Date: Sat Feb 1 15:09:04 2014 -0500 - first pass at new naming approach
Diffstat (limited to 'test/engine/test_reflection.py')
-rw-r--r--test/engine/test_reflection.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/engine/test_reflection.py b/test/engine/test_reflection.py
index 2f311f7e7..77e754475 100644
--- a/test/engine/test_reflection.py
+++ b/test/engine/test_reflection.py
@@ -1501,7 +1501,7 @@ class CaseSensitiveTest(fixtures.TablesTest):
-class ColumnEventsTest(fixtures.TestBase):
+class ColumnEventsTest(fixtures.RemovesEvents, fixtures.TestBase):
@classmethod
def setup_class(cls):
@@ -1526,9 +1526,6 @@ class ColumnEventsTest(fixtures.TestBase):
def teardown_class(cls):
cls.metadata.drop_all(testing.db)
- def teardown(self):
- events.SchemaEventTarget.dispatch._clear()
-
def _do_test(self, col, update, assert_, tablename="to_reflect"):
# load the actual Table class, not the test
# wrapper
@@ -1545,7 +1542,7 @@ class ColumnEventsTest(fixtures.TestBase):
assert_(t)
m = MetaData(testing.db)
- event.listen(Table, 'column_reflect', column_reflect)
+ self.event_listen(Table, 'column_reflect', column_reflect)
t2 = Table(tablename, m, autoload=True)
assert_(t2)