(self)
| 928 | self.assertEqual(con.escape(Foo(), mapping), "bar") |
| 929 | |
| 930 | def test_escape_fallback_encoder(self): |
| 931 | con = self.connect() |
| 932 | |
| 933 | class Custom(str): |
| 934 | pass |
| 935 | |
| 936 | mapping = {str: pymysql.converters.escape_string} |
| 937 | self.assertEqual(con.escape(Custom("foobar"), mapping), "'foobar'") |
| 938 | |
| 939 | def test_escape_no_default(self): |
| 940 | con = self.connect() |