title: Pytest parametrize a test using a fixture
body: <p>I am trying to better understand how to thoroughly unit test using <code>pytest</code> and came across a situation that I am not sure how to best approach.  I found similar questions here on SO about parameterizing fixtures themselves but I don't think that is what I want to do here. But maybe I am not fully understanding fixtures themselves?</p>
  
  <p>Here is some sample code:</p>
  
  <h3>App Code:</h3>
  
  <pre><code>class Person:
      def __init__(self, fname: str, lname: str):
          self.fname = fname
          self.lname = lname
  
      def upper_fullname(self):
          return f'{self.fname} {self.lname}'.upper()
  </code></pre>
  
  <h3>Tests:</h3>
  
  <pre><code>import pytest
  
  @pytest.fixture(scope="module")
  def fixture_mm(conf={"fname": "mickey", "lname": "mouse"}):
      return Person(**conf)
  
  @pytest.fixture(scope="module")
  def fixture_bb(conf={"fname": "bugs", "lname": "bunny"}):
      return Person(**conf)
  
  @pytest.mark.parametrize(
      'person, expected_result',
      [(fixture_mm, "MICKEY MOUSE"), (fixture_bb, "BUGS BUNNY")])
  def test_uppernames(person, expected_result):
      assert person.upper_fullname() == expected_result
  </code></pre>
  
  <p>I would expect both of these tests to pass but instead I get an error message saying <code>AttributeError: 'function' object has no attribute 'upper_fullname'</code>.  What am I missing here?</p>
  
  <p>Thanks.</p>