(self, conn)
| 104 | assert s1 == 'select "field" from "table"' |
| 105 | |
| 106 | def test_dict(self, conn): |
| 107 | s = sql.SQL("select {f} from {t}").format( |
| 108 | f=sql.Identifier("field"), t=sql.Identifier("table") |
| 109 | ) |
| 110 | s1 = s.as_string(conn) |
| 111 | assert isinstance(s1, str) |
| 112 | assert s1 == 'select "field" from "table"' |
| 113 | |
| 114 | def test_compose_literal(self, conn): |
| 115 | s = sql.SQL("select {0};").format(sql.Literal(dt.date(2016, 12, 31))) |