mailakallistov

Untitled

Jan 19th, 2021
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pytest
  2.  
  3.  
  4. @pytest.fixture
  5. def my_fixture(some_other_fixture_which_provides_connection):
  6.     response = some_other_fixture_which_provides_connection.some_endpoint()
  7.     return generator(response.body)
  8.  
  9.  
  10. def generator(response_body):
  11.     for value in response_body:
  12.         yield value
  13.        
  14.  
  15. @pytest.mark.parametrize('response_value', my_fixture)
  16. def test_response(response_value):
  17.     assert response_value.is_OK
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×