updated exception raising

This commit is contained in:
Sairam Aripirala 2020-08-11 14:35:01 -04:00
parent 970aabfdb4
commit 725fba8728

View file

@ -385,12 +385,6 @@ class RequestHandlerMixinTestCase(TestCase):
self.assertEqual(response.code, 409)
self.assertIn(b'Unique Violation', response.body)
@mock.patch('aiopg.cursor.Cursor.execute')
def test_postgres_execute_unclassified(self, execute):
execute.side_effect = errors.InvalidTextRepresentation()
with self.assertRaises(psycopg2.errors.InvalidTextRepresentation):
self.fetch('/execute?value=1')
@mock.patch('aiopg.cursor.Cursor.execute')
def test_postgres_execute_error(self, execute):
execute.side_effect = psycopg2.Error()