diff options
Diffstat (limited to 'tests/test_quote.py')
-rwxr-xr-x | tests/test_quote.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_quote.py b/tests/test_quote.py index e7b3c31..a24ab6d 100755 --- a/tests/test_quote.py +++ b/tests/test_quote.py @@ -165,6 +165,13 @@ class TestQuotedString(ConnectingTestCase): self.assertEqual(q.encoding, 'utf_8') +class TestQuotedIdentifier(ConnectingTestCase): + def test_identifier(self): + from psycopg2.extensions import quote_ident + self.assertEqual(quote_ident('blah-blah', self.conn), '"blah-blah"') + self.assertEqual(quote_ident('quote"inside', self.conn), '"quote""inside"') + + def test_suite(): return unittest.TestLoader().loadTestsFromName(__name__) |