Skip to content
Permalink
Browse files

Add dummy canvas to test

  • Loading branch information
m-kuhn committed Nov 5, 2017
1 parent 7b45e9d commit 04101c3f437da50e137d52f5fe2fa5e6fbfab65a
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/src/python/test_qgsrelationeditwidget.py
@@ -29,7 +29,8 @@
from qgis.gui import (
QgsGui,
QgsRelationWidgetWrapper,
QgsAttributeEditorContext
QgsAttributeEditorContext,
QgsMapCanvas
)

from qgis.PyQt.QtCore import QTimer
@@ -47,7 +48,8 @@ def setUpClass(cls):
Setup the involved layers and relations for a n:m relation
:return:
"""
QgsGui.editorWidgetRegistry().initEditors()
cls.mapCanvas = QgsMapCanvas()
QgsGui.editorWidgetRegistry().initEditors(cls.mapCanvas)
cls.dbconn = 'service=\'qgis_test\''
if 'QGIS_PGTEST_DB' in os.environ:
cls.dbconn = os.environ['QGIS_PGTEST_DB']

0 comments on commit 04101c3

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