title: pytest fixture not working properly with requests input/output
body: <p>I am testing if a web scraper I built still returns the correct data from a website's most current HTML structure. This requires making an outbound HTTP request (I don't want to mock it), and scraping the response.</p>
  <p>When I fixture-ize the scraped HTML data (converted to JSON), and try to access it, pytest throws an error saying</p>
  <p>AttributeError: 'TestGoogleSearch' object has no attribute 'keys' when I try to access the response from the fixture. With:</p>
  <p>obj = &lt;tests.test_google_search.TestGoogleSearch object at 0x7fd073eae0d0&gt;
  target = {'google_query_url': 'https://www.google.com/search?q=GUSTAV%27S+BARGARTEN+97303+google+maps&amp;oq=%7B%27q%27%3A+%22GUSTAV%27S+BARGARTEN+97303+google+maps%22%7D&amp;sourceid=chrome&amp;ie=UTF-8', ...}</p>
  <p>Code below:</p>
  <pre><code>url_1 = 'https://www.google.com/search?q=GUSTAV%27S+BARGARTEN+97303+google+maps&amp;oq=%7B%27q%27%3A+%22GUSTAV%27S+BARGARTEN+97303+google+maps%22%7D&amp;sourceid=chrome&amp;ie=UTF-8'
  
  google_search_json = make_google_search_request(url_1)
  
  url_1_target = {
      'google_query_url': 'https://www.google.com/search?q=GUSTAV%27S+BARGARTEN+97303+google+maps&amp;oq=%7B%27q%27%3A+%22GUSTAV%27S+BARGARTEN+97303+google+maps%22%7D&amp;sourceid=chrome&amp;ie=UTF-8'
       # ...
  }
  
  @pytest.fixture
  def obj():
      yield google_search_json['google_search_results']
  
  
  @pytest.fixture
  def target():
      yield url_1_target
  
  
  class TestGoogleSearch:
  
      def test_keys(obj, target):
          assert sorted(obj.keys()) == sorted(target.keys())
  
      # ...other tests
  
  
  </code></pre>