From: Mike Bayer Date: Fri, 10 Oct 2014 18:05:09 +0000 (-0400) Subject: - add tests for unique and quote flag on create_index() X-Git-Tag: rel_0_7_0~62^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7bbc7db29e40c03cec20ba446bad5a254c5de71;p=thirdparty%2Fsqlalchemy%2Falembic.git - add tests for unique and quote flag on create_index() --- diff --git a/tests/test_op.py b/tests/test_op.py index 13e58bd4..c1e2eb45 100644 --- a/tests/test_op.py +++ b/tests/test_op.py @@ -575,6 +575,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()