query should be expanded before perform character encoding
(self)
| 111 | cur.execute("drop table issue13") |
| 112 | |
| 113 | def test_issue_15(self): |
| 114 | """query should be expanded before perform character encoding""" |
| 115 | conn = self.connect() |
| 116 | c = conn.cursor() |
| 117 | with warnings.catch_warnings(): |
| 118 | warnings.filterwarnings("ignore") |
| 119 | c.execute("drop table if exists issue15") |
| 120 | c.execute("create table issue15 (t varchar(32))") |
| 121 | try: |
| 122 | c.execute("insert into issue15 (t) values (%s)", ("\xe4\xf6\xfc",)) |
| 123 | c.execute("select t from issue15") |
| 124 | self.assertEqual("\xe4\xf6\xfc", c.fetchone()[0]) |
| 125 | finally: |
| 126 | c.execute("drop table issue15") |
| 127 | |
| 128 | def test_issue_16(self): |
| 129 | """Patch for string and tuple escaping""" |