Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pytest
- @pytest.fixture
- def my_fixture(some_other_fixture_which_provides_connection):
- response = some_other_fixture_which_provides_connection.some_endpoint()
- return generator(response.body)
- def generator(response_body):
- for value in response_body:
- yield value
- @pytest.mark.parametrize('response_value', my_fixture)
- def test_response(response_value):
- assert response_value.is_OK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement