Skip to content

Commit

Permalink
Merge pull request #24 from actinia-org/import-error-fix
Browse files Browse the repository at this point in the history
Fix import error
  • Loading branch information
mmacata authored Jun 18, 2024
2 parents 913a715 + 19272c6 commit 9ecf179
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
12 changes: 5 additions & 7 deletions src/actinia_tiling_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
__maintainer__ = "mundialis GmbH % Co. KG"


from pkg_resources import get_distribution, DistributionNotFound
import importlib.metadata

try:
# Change here if project is renamed and does not equal the package name
dist_name = __name__
__version__ = get_distribution(dist_name).version
except DistributionNotFound:
__version__ = "unknown"
finally:
del get_distribution, DistributionNotFound
dist_name = 'actinia_metadata_plugin.wsgi'
__version__ = importlib.metadata.version(dist_name)
except Exception:
__version__ = 'unknown'
3 changes: 1 addition & 2 deletions tests/integrationtests/test_grid_tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


import pytest
from flask import Response

from ..test_resource_base import URL_PREFIX
from ..test_resource_base import ActiniaResourceTestCaseBase
Expand Down Expand Up @@ -96,7 +95,7 @@ def test_get_grid_apidocs(self):
url = f"{self.base_url}/tiling_processes/grid"
resp = self.server.get(url, headers=self.user_auth_header)

assert type(resp) is Response, "The response is not of type Response"
print(type(resp))
assert resp.status_code == 200, "The status code is not 200"
assert "description" in resp.json, "No 'description' in response"
assert "parameters" in resp.json, "No 'parameters' in response"
Expand Down
2 changes: 0 additions & 2 deletions tests/integrationtests/test_list_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


import pytest
from flask import Response

from ..test_resource_base import URL_PREFIX
from ..test_resource_base import ActiniaResourceTestCaseBase
Expand Down Expand Up @@ -69,7 +68,6 @@ def test_get_merge_apidocs(self):
url = f"{self.base_url}/merge_processes"
resp = self.server.get(url, headers=self.user_auth_header)

assert type(resp) is Response, "The response is not of type Response"
assert resp.status_code == 200, "The status code is not 200"
assert "merge_processes" in resp.json[0], \
"No 'merge_processes' in response"
Expand Down
2 changes: 0 additions & 2 deletions tests/integrationtests/test_list_tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


import pytest
from flask import Response

from ..test_resource_base import URL_PREFIX
from ..test_resource_base import ActiniaResourceTestCaseBase
Expand Down Expand Up @@ -69,7 +68,6 @@ def test_get_tiling_list_apidocs(self):
url = f"{self.base_url}/tiling_processes"
resp = self.server.get(url, headers=self.user_auth_header)

assert type(resp) is Response, "The response is not of type Response"
assert resp.status_code == 200, "The status code is not 200"
assert "tiling_processes" in resp.json[0], \
"No 'tiling_processes' in response"
Expand Down
2 changes: 0 additions & 2 deletions tests/integrationtests/test_patch_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


import pytest
from flask import Response
from flask.json import loads as json_loads
from jinja2 import Template

Expand Down Expand Up @@ -290,7 +289,6 @@ def test_get_patch_apidocs(self):
url = f"{self.base_url}/merge_processes/patch"
resp = self.server.get(url, headers=self.user_auth_header)

assert type(resp) is Response, "The response is not of type Response"
assert resp.status_code == 200, "The status code is not 200"
assert "description" in resp.json, "No 'description' in response"
assert "parameters" in resp.json, "No 'parameters' in response"
Expand Down

0 comments on commit 9ecf179

Please sign in to comment.