Skip to content

Commit

Permalink
Update pytest-bdd to 7.3.0 and remove workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Oct 2, 2024
1 parent b42a8e8 commit 02fef14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/features/api/api_deposit_open.feature
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Feature: Deposit API (open)
And deposit exists
And deposit is archived
And user viewer is authenticated
And as viewer the Yoda browse collections API is queried with <collection> # Workaround for https://github.com/pytest-dev/pytest-bdd/issues/689
And the Yoda browse collections API is queried with <collection>
Then the response status code is "200"
And the browse result contains deposit

Expand Down
2 changes: 1 addition & 1 deletion tests/features/api/api_deposit_restricted.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Feature: Deposit API (restricted)
And deposit exists
And deposit is archived
And user viewer is authenticated
And as viewer the Yoda browse collections API is queried with <collection> # Workaround for https://github.com/pytest-dev/pytest-bdd/issues/689
And the Yoda browse collections API is queried with <collection>
Then the response status code is "200"
And the browse result does not contain deposit

Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requests==2.32.2
selenium==4.21.0
splinter==0.21.0
pytest-splinter==3.3.2
pytest_bdd==7.2.0
pytest_bdd==7.3.0
pytest==8.2.2
deepdiff==6.6.1
pyperclip==1.9.0
11 changes: 5 additions & 6 deletions tests/step_defs/api/test_api_deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,12 @@ def data_access_restriction_restricted(user, deposit_name):
)


# Workaround for https://github.com/pytest-dev/pytest-bdd/issues/689
@given(parsers.parse("as viewer the Yoda browse collections API is queried with {collection}"), target_fixture="api_response")
def api_browse_folder(collection):
@given(parsers.parse("the Yoda browse collections API is queried with {collection}"), target_fixture="api_response")
def api_browse_collections(user, collection):
return api_request(
"viewer",
"browse_folder",
{"coll": collection}
user,
"browse_collections",
{"coll": collection, "sort_order": "desc"}
)


Expand Down

0 comments on commit 02fef14

Please sign in to comment.