diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-10 14:05:09 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-10 14:05:09 -0400 |
commit | b98df9bf13b5f65dbee4b728c6c78bf2560fa522 (patch) | |
tree | 465e224c0c2a1a62863159388f6c6d9ad0ddda5f /tests | |
parent | 5bb97a4b094bd6aac0a47f2c7ad268b57cd4b32d (diff) | |
download | alembic-b98df9bf13b5f65dbee4b728c6c78bf2560fa522.tar.gz |
- add tests for unique and quote flag on create_index()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_op.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_op.py b/tests/test_op.py index 5434900..8b94cd0 100644 --- a/tests/test_op.py +++ b/tests/test_op.py @@ -614,6 +614,20 @@ class OpTest(TestBase): "CREATE INDEX ik_test ON t1 (foo, bar)" ) + def test_create_unique_index(self): + context = op_fixture() + op.create_index('ik_test', 't1', ['foo', 'bar'], unique=True) + context.assert_( + "CREATE UNIQUE INDEX ik_test ON t1 (foo, bar)" + ) + + def test_create_index_quote_flag(self): + context = op_fixture() + op.create_index('ik_test', 't1', ['foo', 'bar'], quote=True) + context.assert_( + 'CREATE INDEX "ik_test" ON t1 (foo, bar)' + ) + def test_create_index_table_col_event(self): context = op_fixture() |