Created
March 12, 2015 09:31
-
-
Save Suor/3e66afdeedcb70ab0b34 to your computer and use it in GitHub Desktop.
Test against real database with pytest-django
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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