Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced HAS_SPATIAL_DB by testing database feature
Refs #22632. This should be the base for using more database features to exclude specific backends in GIS tests. Thanks Tim Graham for the review.
- Loading branch information
Showing
20 changed files
with
101 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper | ||
from django.db.backends.mysql.base import ( | ||
DatabaseWrapper as MySQLDatabaseWrapper, | ||
DatabaseFeatures as MySQLDatabaseFeatures, | ||
) | ||
from django.contrib.gis.db.backends.base import BaseSpatialFeatures | ||
from django.contrib.gis.db.backends.mysql.creation import MySQLCreation | ||
from django.contrib.gis.db.backends.mysql.introspection import MySQLIntrospection | ||
from django.contrib.gis.db.backends.mysql.operations import MySQLOperations | ||
|
||
|
||
class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures): | ||
pass | ||
|
||
|
||
class DatabaseWrapper(MySQLDatabaseWrapper): | ||
def __init__(self, *args, **kwargs): | ||
super(DatabaseWrapper, self).__init__(*args, **kwargs) | ||
self.features = DatabaseFeatures(self) | ||
self.creation = MySQLCreation(self) | ||
self.ops = MySQLOperations(self) | ||
self.introspection = MySQLIntrospection(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
from django.db.backends.oracle.base import DatabaseWrapper as OracleDatabaseWrapper | ||
from django.db.backends.oracle.base import ( | ||
DatabaseWrapper as OracleDatabaseWrapper, | ||
DatabaseFeatures as OracleDatabaseFeatures, | ||
) | ||
from django.contrib.gis.db.backends.base import BaseSpatialFeatures | ||
from django.contrib.gis.db.backends.oracle.creation import OracleCreation | ||
from django.contrib.gis.db.backends.oracle.introspection import OracleIntrospection | ||
from django.contrib.gis.db.backends.oracle.operations import OracleOperations | ||
|
||
|
||
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures): | ||
pass | ||
|
||
|
||
class DatabaseWrapper(OracleDatabaseWrapper): | ||
def __init__(self, *args, **kwargs): | ||
super(DatabaseWrapper, self).__init__(*args, **kwargs) | ||
self.features = DatabaseFeatures(self) | ||
self.ops = OracleOperations(self) | ||
self.creation = OracleCreation(self) | ||
self.introspection = OracleIntrospection(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.