Skip to content

Commit add60f6

Browse files
committed
Fix README.rst example
1 parent f1f4f4e commit add60f6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -620,18 +620,16 @@ Full example:
620620
from pytest_bdd import given, when, then
621621
622622
@given("the following user details:")
623-
def given_user_details(datatable):
623+
def _(datatable):
624624
assert datatable == [["name", "email"], ["John", "[email protected]"]]
625625
626-
# When step to capture assigned roles
627626
@when("the user is assigned the following roles:")
628-
def when_user_roles(datatable):
627+
def _(datatable):
629628
assert datatable == [["role"], ["Admin"], ["Editor"]]
630629
631-
# Then step to validate permissions
632630
@then("the user should have the following permissions:")
633-
def then_user_permissions(datatable):
634-
permissions = [
631+
def _(datatable):
632+
expected_permissions = [
635633
["permission", "allowed"],
636634
["view content", "true"],
637635
["edit content", "true"],

0 commit comments

Comments
 (0)