Fix issue with test breakage when using canvas on qgis api. See #924