Loading django/contrib/gis/tests/tests.py +24 −17 Original line number Diff line number Diff line import unittest from django.contrib.gis.db.backends.postgis.operations import PostGISOperations from django.core.exceptions import ImproperlyConfigured from django.db import ProgrammingError try: from django.contrib.gis.db.backends.postgis.operations import PostGISOperations HAS_POSTGRES = True except ImportError: HAS_POSTGRES = False if HAS_POSTGRES: class FakeConnection(object): def __init__(self): self.settings_dict = { Loading @@ -27,6 +33,7 @@ class FakePostGISOperations(PostGISOperations): raise NotImplementedError('This function was not expected to be called') @unittest.skipUnless(HAS_POSTGRES, "The psycopg2 driver is needed for these tests") class TestPostgisVersionCheck(unittest.TestCase): """ Tests that the postgis version check parses correctly the version numbers Loading Loading
django/contrib/gis/tests/tests.py +24 −17 Original line number Diff line number Diff line import unittest from django.contrib.gis.db.backends.postgis.operations import PostGISOperations from django.core.exceptions import ImproperlyConfigured from django.db import ProgrammingError try: from django.contrib.gis.db.backends.postgis.operations import PostGISOperations HAS_POSTGRES = True except ImportError: HAS_POSTGRES = False if HAS_POSTGRES: class FakeConnection(object): def __init__(self): self.settings_dict = { Loading @@ -27,6 +33,7 @@ class FakePostGISOperations(PostGISOperations): raise NotImplementedError('This function was not expected to be called') @unittest.skipUnless(HAS_POSTGRES, "The psycopg2 driver is needed for these tests") class TestPostgisVersionCheck(unittest.TestCase): """ Tests that the postgis version check parses correctly the version numbers Loading