Closed ShedPlant closed 2 years ago
You have missed return from step function
@given("the user creates a vehicle", target_fixture="vehicle_in_dynamo_f")
@given("the user has a vehicle", target_fixture="vehicle_in_dynamo_f")
def vehicle_in_dynamo(users_vehicles_dynamo_table, example_user_vehicle):
return users_vehicles_dynamo_table.put_item(Item=example_user_vehicle)
Maybe that was it, thanks 😊
https://pypi.org/project/pytest-bdd/
The documentation suggests that you can use multiple 'given' texts with a single target fixture:
Originally I had a single 'given' text and it worked fine:
When I added a second 'given' according to documentation:
I see an error (among many)
E fixture 'target_fixture' not found
I also tried this but it doesn't work either:
It does seem a bit odd that
target_fixture
argument moves out from the 'given' decorator to the decorated function.Can someone please tell me if I'm doing it wrong and/or update the documentation?