@skipIf((PSYCOPG2_VERSION < (2, 5)), 'Connection context managers not defined in <2.5.')
def test_contextmanager_connection(self):
    service = 'fo'
    with self._get_conn(service=service) as conn:
        conn.cursor().execute("select 'blah'")
        self.assert_structure(dict(name='postgres.query', service=service))
@skipIf((PSYCOPG2_VERSION < (2, 5)), 'Connection context managers not defined in <2.5.')
def test_contextmanager_connection(self):
    service = 'fo'
    with self._get_conn(service=service) as conn:
        conn.cursor().execute("select 'blah'")
        self.assert_structure(dict(name='postgres.query', service=service))