Skip to content

Commit

Permalink
[oracle] Some updates to Oracle provider test suite
Browse files Browse the repository at this point in the history
Now the Oracle provider passes the data provider edit stress/
conformance tests without issue!

(cherry-picked from 68838aa)
  • Loading branch information
nyalldawson committed May 24, 2018
1 parent 32ba752 commit 3e67ad5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/src/python/test_provider_oracle.py
Expand Up @@ -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)""")
Expand All @@ -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):
Expand Down Expand Up @@ -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=' %
Expand Down

0 comments on commit 3e67ad5

Please sign in to comment.