Ticket #7600: testcase_quoting_multiple_indexes.patch
| File testcase_quoting_multiple_indexes.patch, 1020 bytes (added by Felix Schwarz <felix.schwarz@…>, 3 years ago) |
|---|
-
trac/db/tests/postgres_test.py
65 65 self.assertEqual('CREATE TABLE "foo" ( "my name" text)', sql_commands[0]) 66 66 index_sql = 'CREATE INDEX "foo_my name_idx" ON "foo" ("my name")' 67 67 self.assertEqual(index_sql, sql_commands[1]) 68 69 def test_quote_index_declaration_for_multiple_indexes(self): 70 table = Table('foo') 71 table[Column('a'), Column('b'), 72 Index(['a', 'b'])] 73 sql_generator = PostgreSQLConnector(self.env).to_sql(table) 74 sql_commands = self._normalize_sql(sql_generator) 75 self.assertEqual(2, len(sql_commands)) 76 self.assertEqual('CREATE TABLE "foo" ( "a" text, "b" text)', sql_commands[0]) 77 index_sql = 'CREATE INDEX "foo_a_b_idx" ON "foo" ("a","b")' 78 self.assertEqual(index_sql, sql_commands[1]) 68 79 69 80 70 81 def suite():
