Postgres tests not failing when postgres not installed. Fixes #78.

This commit is contained in:
Ryan Williams
2011-02-15 17:20:46 -08:00
parent 5becce8f6f
commit 33c2e713c7
2 changed files with 4 additions and 1 deletions

View File

@@ -71,3 +71,4 @@ Thanks To
* Ruijun Luo, figuring out incorrect openssl import for wrap_ssl (#73)
* rfk, patch to get green zmq to respect noblock flag.
* Soren Hansen, finding and fixing issue in subprocess (#77)
* Stefano Rivera, making tests pass in absence of postgres (#78)

View File

@@ -1,7 +1,8 @@
import os
from tests import patcher_test
from tests import patcher_test, skip_unless
from tests import get_database_auth
from tests.db_pool_test import postgres_requirement
psycopg_test_file = """
import os
@@ -35,6 +36,7 @@ print "done"
"""
class PatchingPsycopg(patcher_test.ProcessBase):
@skip_unless(postgres_requirement)
def test_psycopg_patched(self):
if 'PSYCOPG_TEST_DSN' not in os.environ:
# construct a non-json dsn for the subprocess