Skip to content

Commit

Permalink
Merge pull request #71 from vaahtokarkki/bump-version-to-0.3.1
Browse files Browse the repository at this point in the history
chore: bump version to 0.3.1
  • Loading branch information
lehtojaa authored Aug 9, 2023
2 parents 46fbd38 + 2ba43b8 commit 738cb18
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.1] - 2023-08-08

- Feature: Add `exc_info` and `stack_info` parameters to message bar logger for capturing exception.

## [0.3.0] - 2023-03-14

- Feature: Add api to safely load package files
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ multi_line_output = 3

[metadata]
name = qgis_plugin_tools
version = 0.3.0
version = 0.3.1
author = 3Liz, Gispo Ltd.
author_email = info@gispo.fi
maintainer = Gispo Ltd.
Expand Down
24 changes: 24 additions & 0 deletions test/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
from ..tools.network import download_to_file, fetch, post


@pytest.mark.skip(
"Skipped due httbin.org being flaky."
"TODO: refactor tests not to be dependent of an external http api"
)
def test_fetch(qgis_new_project):
data = fetch("https://httpbin.org/get")
data = json.loads(data)
Expand All @@ -22,13 +26,21 @@ def test_fetch_invalid_url(qgis_new_project):
fetch("invalidurl")


@pytest.mark.skip(
"Skipped due httbin.org being flaky."
"TODO: refactor tests not to be dependent of an external http api"
)
def test_fetch_params(qgis_new_project):
data = fetch("https://httpbin.org/get", params={"foo": "bar"})
data = json.loads(data)
assert data["url"] == "https://httpbin.org/get?foo=bar"
assert data["args"] == {"foo": "bar"}


@pytest.mark.skip(
"Skipped due httbin.org being flaky."
"TODO: refactor tests not to be dependent of an external http api"
)
def test_post(qgis_new_project):
data = post("https://httpbin.org/post")
data = json.loads(data)
Expand All @@ -40,13 +52,21 @@ def test_post_invalid_url(qgis_new_project):
post("invalidurl")


@pytest.mark.skip(
"Skipped due httbin.org being flaky."
"TODO: refactor tests not to be dependent of an external http api"
)
def test_post_data(qgis_new_project):
data = post("https://httpbin.org/post", data={"foo": "bar"})
data = json.loads(data)
assert data["url"] == "https://httpbin.org/post"
assert data["data"] == json.dumps({"foo": "bar"})


@pytest.mark.skip(
"Skipped due httbin.org being flaky."
"TODO: refactor tests not to be dependent of an external http api"
)
def test_upload_file(qgis_new_project, file_fixture):
file_name, file_content, file_type = file_fixture
data = post(
Expand All @@ -59,6 +79,10 @@ def test_upload_file(qgis_new_project, file_fixture):
assert bytes(data["files"]["file"], "utf-8") == file_content


@pytest.mark.skip(
"Skipped due httbin.org being flaky."
"TODO: refactor tests not to be dependent of an external http api"
)
def test_upload_multiple_files(qgis_new_project, file_fixture, another_file_fixture):
file_name, file_content, file_type = file_fixture
another_file_name, another_file_content, another_file_type = another_file_fixture
Expand Down

0 comments on commit 738cb18

Please sign in to comment.