title: pytest-django won't allow database access even with mark
body: <p>I'm having a difficult time figuring out what is wrong with my setup. I'm trying to test a login view, and no matter what I try, I keep getting:</p>
  
  <p><code>Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.</code></p>
  
  <p>My test:</p>
  
  <pre><code>import pytest
  
  from ..models import User
  
  
  @pytest.mark.django_db
  def test_login(client):
      # If an anonymous user accesses the login page:
      response = client.get('/users/login/')
      # Then the server should respond with a successful status code:
      assert response.status_code == 200
  
      # Given an existing user:
      user = User.objects.get(username='user')
      # If we attempt to log into the login page:
      response = client.post('/users/login/', {'username': user.username, 'password': 'somepass'})
      # Then the server should redirect the user to the default redirect location:
      assert response.status_code == 302
  </code></pre>
  
  <p>My conftest.py file, in the same tests directory:</p>
  
  <pre><code>import pytest
  
  from django.core.management import call_command
  
  
  @pytest.fixture(autouse=True)
  def django_db_setup(django_db_setup, django_db_blocker):
      with django_db_blocker.unblock():
          call_command('loaddata', 'test_users.json')
  </code></pre>
  
  <p>My pytest.ini file (which specifies the correct Django settings file):</p>
  
  <pre><code>[pytest]
  DJANGO_SETTINGS_MODULE = config.settings
  </code></pre>
  
  <p>I'm stumped. I've tried using <code>scope="session"</code> like in the <a href="https://pytest-django.readthedocs.io/en/latest/database.html#populate-the-database-with-initial-test-data" rel="noreferrer">documentation</a> together with either an <code>@pytest.mark.django_db</code> mark, a <code>db</code> fixture (as a parameter to the test function), or both with no luck. I've commented out each line of the test to figure out which one was triggering the problem, but couldn't figure it out. I could only get the test to run at all if I removed all db-dependent fixtures/marks/code from the test and had a simple <code>assert True</code>. I don't believe the issue is in my Django settings, as the development server runs fine and is able to access the database.</p>
  
  <p>What am I missing here?</p>