title: How can I pass fixtures to pytest.mark.parameterize?
body: <p>I am trying to pass three different fixtures to my <code>pytest.mark.parameterize</code> decorator, like this:</p>
  
  <pre><code>@pytest.mark.parametrize("credentials, return_code", [
      (user1, 200),
      #(user2, 200),
      #(user3, 401)
  ])
  def test_login():
      assert True
  # Actual test uses response.return_code == return_code
  </code></pre>
  
  <p>However, I get an error that reads:</p>
  
  <pre><code>NameError: name 'user1' is not defined
  </code></pre>
  
  <p>This isn't correct though, I have defined it in <code>conftest.py</code>:</p>
  
  <pre><code>user1_info = [('user1', 'password')]
  @pytest.fixture(params=user1_info)
  def user1(request):
      return request.param
  </code></pre>
  
  <hr>
  
  <p>The fixture works if I change my test to be like this:</p>
  
  <pre><code>def test_login(user1):
      assert True
  # Actual test uses response.return_code == return_code
  </code></pre>
  
  <p>The problem is that if I do it this way, I have to write three separate tests, one for each fixture, and for each status_code check. If I could use <code>parameterize</code>, I could use one function and check the user/expected return code.</p>
  
  <p>How can I utilize my fixtures are part of the <code>pytest.mark.parameterize</code> decorator?</p>