From a7bbc7db29e40c03cec20ba446bad5a254c5de71 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 10 Oct 2014 14:05:09 -0400 Subject: [PATCH] - add tests for unique and quote flag on create_index() --- tests/test_op.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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() -- 2.47.2