Skip to content

Commit dd79175

Browse files
committed
Fix tutorial skipping a step example code
1 parent 4b7c27c commit dd79175

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/tutorial.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,15 +636,17 @@ To skip the step if `To be or not to be` quote could not be found:
636636
def found_n_quotes_in_the_db(step, number):
637637
if not hasattr(step.context, "result"):
638638
step.skip()
639+
return
639640
640641
assert len(step.context.result) == number
641642
642643
step.context.database.delete_id = step.context.result[0]['id']
643644
644-
@then("I expect {number:g} quote in the database")
645-
def expect_amount_of_quotes(step, number):
645+
@then("I delete one of them")
646+
def delete_one_quote(step):
646647
if not hasattr(step.context, "result"):
647648
step.skip()
649+
return
648650
649651
assert an_internal_function_to_delete_db_row(step.context.database.delete_id) is True
650652

0 commit comments

Comments
 (0)