@pytest.mark.parametrize('open_quote,close_quote', [('"', '"'), ('[', ']')])
def test_detect_fts(open_quote, close_quote):
    sql = '\n    CREATE TABLE "Dumb_Table" (\n      "TreeID" INTEGER,\n      "qSpecies" TEXT\n    );\n    CREATE TABLE "Street_Tree_List" (\n      "TreeID" INTEGER,\n      "qSpecies" TEXT,\n      "qAddress" TEXT,\n      "SiteOrder" INTEGER,\n      "qSiteInfo" TEXT,\n      "PlantType" TEXT,\n      "qCaretaker" TEXT\n    );\n    CREATE VIEW Test_View AS SELECT * FROM Dumb_Table;\n    CREATE VIRTUAL TABLE {open}Street_Tree_List_fts{close} USING FTS4 ("qAddress", "qCaretaker", "qSpecies", content={open}Street_Tree_List{close});\n    CREATE VIRTUAL TABLE r USING rtree(a, b, c);\n    '.format(open=open_quote, close=close_quote)
    conn = utils.sqlite3.connect(':memory:')
    conn.executescript(sql)
    assert (None is utils.detect_fts(conn, 'Dumb_Table'))
    assert (None is utils.detect_fts(conn, 'Test_View'))
    assert (None is utils.detect_fts(conn, 'r'))
    assert ('Street_Tree_List_fts' == utils.detect_fts(conn, 'Street_Tree_List'))
@pytest.mark.parametrize('open_quote,close_quote', [('"', '"'), ('[', ']')])
def test_detect_fts(open_quote, close_quote):
    sql = '\n    CREATE TABLE "Dumb_Table" (\n      "TreeID" INTEGER,\n      "qSpecies" TEXT\n    );\n    CREATE TABLE "Street_Tree_List" (\n      "TreeID" INTEGER,\n      "qSpecies" TEXT,\n      "qAddress" TEXT,\n      "SiteOrder" INTEGER,\n      "qSiteInfo" TEXT,\n      "PlantType" TEXT,\n      "qCaretaker" TEXT\n    );\n    CREATE VIEW Test_View AS SELECT * FROM Dumb_Table;\n    CREATE VIRTUAL TABLE {open}Street_Tree_List_fts{close} USING FTS4 ("qAddress", "qCaretaker", "qSpecies", content={open}Street_Tree_List{close});\n    CREATE VIRTUAL TABLE r USING rtree(a, b, c);\n    '.format(open=open_quote, close=close_quote)
    conn = utils.sqlite3.connect(':memory:')
    conn.executescript(sql)
    assert (None is utils.detect_fts(conn, 'Dumb_Table'))
    assert (None is utils.detect_fts(conn, 'Test_View'))
    assert (None is utils.detect_fts(conn, 'r'))
    assert ('Street_Tree_List_fts' == utils.detect_fts(conn, 'Street_Tree_List'))