Skip to content
Permalink
Browse files

Fake statusbar for tests.

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@305 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
cpolymeris@gmail.com
cpolymeris@gmail.com committed Jul 22, 2012
1 parent aa3d766 commit b7a9e211181c8089fd08651e79888621becd8b30
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/sextante/tests/qgis_interface.py
@@ -41,6 +41,12 @@ def __init__(self, canvas):
self.canvas = canvas
self.testRaster = QgsRasterLayer('data/raster', "raster")
self.testVector = QgsVectorLayer('data/vector', "vector", 'ogr')
QgsMapLayerRegistry.instance().addMapLayer(self.testRaster)
QgsMapLayerRegistry.instance().addMapLayer(self.testVector)

self.statusBar = type('FakeStatusBar', (),
{'showMessage' : lambda _, m: None
})()

def zoomFull(self):
"""Zoom to the map full extent"""
@@ -89,7 +95,10 @@ def mainWindow(self):
In case of QGIS it returns an instance of QgisApp
"""
pass
return type('FakeMainWindow', (),
{'statusBar' :
lambda _: self.statusBar
})()

def addDockWidget(self, area, dockwidget):
""" Add a dock widget to the main window """

0 comments on commit b7a9e21

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