Skip to content

Instantly share code, notes, and snippets.

@Suor
Created March 12, 2015 09:31
Show Gist options
  • Save Suor/3e66afdeedcb70ab0b34 to your computer and use it in GitHub Desktop.
Save Suor/3e66afdeedcb70ab0b34 to your computer and use it in GitHub Desktop.
Test against real database with pytest-django
import pytest
@pytest.fixture()
def real_db(_django_cursor_wrapper):
_django_cursor_wrapper.enable()
def test_index(client, real_db):
response = client.get('/')
assert response.status_code == 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment