MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / test_escape_custom_object

Method test_escape_custom_object

pymysql/tests/test_connection.py:924–928  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

922 self.assertEqual(con.escape(val, con.encoders), "'2012-03-04 05:06:00'")
923
924 def test_escape_custom_object(self):
925 con = self.connect()
926
927 mapping = {Foo: escape_foo}
928 self.assertEqual(con.escape(Foo(), mapping), "bar")
929
930 def test_escape_fallback_encoder(self):
931 con = self.connect()

Callers

nothing calls this directly

Calls 3

FooClass · 0.85
escapeMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected