File: test_errorcodes.py

package info (click to toggle)
python-psycopg2cffi 2.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 824 kB
  • sloc: python: 10,828; makefile: 17
file content (9 lines) | stat: -rw-r--r-- 270 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
from unittest import TestCase

from psycopg2cffi import errorcodes


class TestErrorcodes(TestCase):
    def test_lookup(self):
        self.assertEqual(errorcodes.lookup('54001'), 'STATEMENT_TOO_COMPLEX')
        self.assertRaises(KeyError, errorcodes.lookup, '41234')