Skip to content
Snippets Groups Projects
Commit e897048b authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

fixed tests

parent 94e2bef2
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ cache:
- venv/
before_script:
- apt-get update
- apt-get update
- apt-get -y install git-lfs
- apt-get install -y wget
- apt-get install -y unzip
......
......@@ -122,8 +122,8 @@ class TestLabeling(EOTSVTestCase):
canvas.setTSD(tsd)
canvas.setMapView(mv)
pos = QPoint(int(canvas.width() * 0.5), int(canvas.height() * 0.5))
menu = canvas.contextMenu(pos)
self.assertIsInstance(menu, QMenu)
menu = QMenu()
canvas.populateContextMenu(menu, pos)
def findLabelAction(menu) -> QAction:
for a in menu.actions():
......
......@@ -48,38 +48,6 @@ class TestMain(EOTSVTestCase):
QApplication.processEvents()
super().tearDown()
def test_read_init(self):
"""Test that the plugin __init__ will validate on plugins.qgis.org."""
# You should update this list according to the latest in
# https://github.com/qgis/qgis-django/blob/master/qgis-app/plugins/validator.py
required_metadata = [
'name',
'description',
'version',
'qgisMinimumVersion',
'email',
'author']
file_path = os.path.abspath(os.path.join(
os.path.dirname(__file__), os.pardir,
'metadata.txt'))
metadata = []
parser = configparser.ConfigParser()
parser.optionxform = str
parser.read(file_path)
message = 'Cannot find a section named "general" in %s' % file_path
assert parser.has_section('general'), message
metadata.extend(parser.items('general'))
for expectation in required_metadata:
message = ('Cannot find metadata "%s" in metadata source (%s).' % (
expectation, file_path))
self.assertIn(expectation, dict(metadata), message)
def test_TimeSeriesViewer(self):
from eotimeseriesviewer.main import EOTimeSeriesViewer
TSV = EOTimeSeriesViewer()
......
......@@ -41,38 +41,6 @@ class TestMapTools(EOTSVTestCase):
"""
def test_read_init(self):
"""Test that the plugin __init__ will validate on plugins.qgis.org."""
# You should update this list according to the latest in
# https://github.com/qgis/qgis-django/blob/master/qgis-app/plugins/validator.py
required_metadata = [
'name',
'description',
'version',
'qgisMinimumVersion',
'email',
'author']
file_path = os.path.abspath(os.path.join(
os.path.dirname(__file__), os.pardir,
'metadata.txt'))
metadata = []
parser = configparser.ConfigParser()
parser.optionxform = str
parser.read(file_path)
message = 'Cannot find a section named "general" in %s' % file_path
assert parser.has_section('general'), message
metadata.extend(parser.items('general'))
for expectation in required_metadata:
message = ('Cannot find metadata "%s" in metadata source (%s).' % (
expectation, file_path))
self.assertIn(expectation, dict(metadata), message)
def test_TimeSeriesViewer(self):
from eotimeseriesviewer.main import EOTimeSeriesViewer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment