Skip to content


make code compatible with QGIS 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Feb 11, 2018
1 parent 1f051ff commit 42dd971
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/
Expand Up @@ -16,7 +16,7 @@

import os

from qgis.core import QgsVectorLayer, QgsProject
from qgis.core import QgsVectorLayer, QgsMapLayerRegistry

from qgis.testing import start_app, unittest

Expand All @@ -37,7 +37,7 @@ def setUpClass(cls):
# Create test layer
cls.vl = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."colors" sql=', 'colors', 'postgres')

QgsMapLayerRegistry.instance().addMapLayer(cls.vl, True)

def test_postgres_domain(self):
self.assertEqual(self.vl.dataProvider().enumValues(1), ['red', 'green', 'blue'])
Expand Down

0 comments on commit 42dd971

Please sign in to comment.