MCPcopy
hub / github.com/django/django / test_non_db_connection_classes

Method test_non_db_connection_classes

tests/gis_tests/tests.py:102–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

100@unittest.skipUnless(HAS_POSTGRES, "PostGIS-specific tests.")
101class TestPostGISBackend(unittest.TestCase):
102 def test_non_db_connection_classes(self):
103 from django.contrib.gis.db.backends.postgis.base import DatabaseWrapper
104 from django.db.backends.postgresql.features import DatabaseFeatures
105 from django.db.backends.postgresql.introspection import DatabaseIntrospection
106 from django.db.backends.postgresql.operations import DatabaseOperations
107
108 wrapper = DatabaseWrapper(settings_dict={}, alias=NO_DB_ALIAS)
109 # PostGIS-specific stuff is not initialized for non-db connections.
110 self.assertIs(wrapper.features_class, DatabaseFeatures)
111 self.assertIs(wrapper.ops_class, DatabaseOperations)
112 self.assertIs(wrapper.introspection_class, DatabaseIntrospection)

Callers

nothing calls this directly

Calls 1

DatabaseWrapperClass · 0.90

Tested by

no test coverage detected