summaryrefslogtreecommitdiff
path: root/tests/test_async.py
diff options
context:
space:
mode:
authorCatalin Iacob <iacobcatalin@gmail.com>2013-03-15 18:10:13 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2013-03-16 00:54:11 +0000
commit7abe1775d0bc037494576691172ece437dea3761 (patch)
tree8aa230c02105697a63567fb219094e13c7930465 /tests/test_async.py
parent7f86529183048a7ad87e3dc300a8f0857b96690a (diff)
downloadpsycopg2-7abe1775d0bc037494576691172ece437dea3761.tar.gz
Fix tests for Postgres 9.3
Postgres 9.3 turns messages about implicit indexes and sequences from NOTICE to DEBUG1 so the tests fail with a default 9.3 server configuration because the client doesn't get any NOTICE. Fix it by also asking for DEBUG1 messages from the server when testing against Postgres >= 9.3.
Diffstat (limited to 'tests/test_async.py')
-rwxr-xr-xtests/test_async.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_async.py b/tests/test_async.py
index 08113c4..b51429f 100755
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -429,6 +429,9 @@ class AsyncTests(unittest.TestCase):
def test_notices(self):
del self.conn.notices[:]
cur = self.conn.cursor()
+ if self.conn.server_version >= 90300:
+ cur.execute("set client_min_messages=debug1")
+ self.wait(cur)
cur.execute("create temp table chatty (id serial primary key);")
self.wait(cur)
self.assertEqual("CREATE TABLE", cur.statusmessage)