Skip to content
Permalink
Browse files

[oracle] Some updates to Oracle provider test suite

Now the Oracle provider passes the data provider edit stress/
conformance tests without issue!

(cherry-picked from 68838aa)
  • Loading branch information
nyalldawson committed Apr 25, 2018
1 parent 32ba752 commit 3e67ad5aa02c566abab5d3bd02f5163f058c7f05
Showing with 9 additions and 2 deletions.
  1. +9 −2 tests/src/python/test_provider_oracle.py
@@ -64,7 +64,7 @@ def execSQLCommand(self, sql, ignore_errors=False):
query.finish()

# disabled: WIP
def disabled_getSource(self):
def getSource(self):
# create temporary table for edit tests
self.execSQLCommand('DROP TABLE "QGIS"."EDIT_DATA"', ignore_errors=True)
self.execSQLCommand("""CREATE TABLE QGIS.EDIT_DATA ("pk" INTEGER GENERATED by default ON null as IDENTITY(START WITH 1 INCREMENT BY 1) PRIMARY KEY, "cnt" INTEGER, "name" VARCHAR2(100), "name2" VARCHAR2(100), "num_char" VARCHAR2(100), GEOM SDO_GEOMETRY)""")
@@ -80,7 +80,7 @@ def disabled_getSource(self):
return vl

# disabled: WIP
def disabled_getEditableLayer(self):
def getEditableLayer(self):
return self.getSource()

def enableCompiler(self):
@@ -110,6 +110,13 @@ def uncompiledFilters(self):
'intersects($geometry,geom_from_wkt( \'Polygon ((-72.2 66.1, -65.2 66.1, -65.2 72.0, -72.2 72.0, -72.2 66.1))\'))'])
return filters

def testAddFeatureWrongGeomType(self):
"""
We override this test for Oracle provider, because Oracle DBs don't care
about geometry type constraints
"""
pass

# HERE GO THE PROVIDER SPECIFIC TESTS
def testDateTimeTypes(self):
vl = QgsVectorLayer('%s table="QGIS"."DATE_TIMES" sql=' %

0 comments on commit 3e67ad5

Please sign in to comment.
You can’t perform that action at this time.