Skip to content

Commit

Permalink
test: Simplify xfail due to missing features (#978)
Browse files Browse the repository at this point in the history
* test: Add an `_xfail_due_to_version` helper function

* Revert "test: Add an `_xfail_due_to_version` helper function"

This reverts commit 437c192.

* Simplify xfails due to missing features
  • Loading branch information
edgarrmondragon authored Sep 18, 2023
1 parent b98ef02 commit f6aa2ae
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,16 @@ def test_quota(
survey_id: int,
):
"""Test quota methods."""
if server_version < (6, 0, 0):
request.node.add_marker(
pytest.mark.xfail(
reason=(
"Quota RPC methods are not supported in LimeSurvey "
f"{server_version} < 6.0.0"
),
raises=requests.exceptions.HTTPError,
request.node.add_marker(
pytest.mark.xfail(
server_version < (6, 0, 0),
reason=(
"Quota RPC methods are not supported in LimeSurvey "
f"{server_version} < 6.0.0"
),
)
raises=requests.exceptions.HTTPError,
),
)

with pytest.raises(LimeSurveyStatusError, match="No quotas found"):
client.list_quotas(survey_id)
Expand Down Expand Up @@ -566,16 +566,16 @@ def test_get_available_site_settings(
server_version: semver.Version,
):
"""Test getting available site settings."""
if server_version < (6, 0, 0):
request.node.add_marker(
pytest.mark.xfail(
reason=(
"RPC method `get_available_site_settings` is not supported in "
f"LimeSurvey {server_version} < 6.0.0"
),
raises=requests.exceptions.HTTPError,
request.node.add_marker(
pytest.mark.xfail(
server_version < (6, 0, 0),
reason=(
"RPC method `get_available_site_settings` is not supported in "
f"LimeSurvey {server_version} < 6.0.0"
),
)
raises=requests.exceptions.HTTPError,
),
)
assert client.get_available_site_settings()


Expand Down

0 comments on commit f6aa2ae

Please sign in to comment.