tests: replace TestApp by classic app fixture (fixes #19900)

This commit is contained in:
Benjamin Dauvergne 2017-11-06 11:55:08 +01:00
parent fb987b6133
commit bab24b48c0
1 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from webtest import TestApp, Upload
from webtest import Upload
import pytest
import urlparse
@ -9,7 +9,6 @@ try:
except ImportError:
magic = None
from fargo.wsgi import application
from fargo.fargo.models import UserDocument
pytestmark = pytest.mark.django_db
@ -17,8 +16,7 @@ pytestmark = pytest.mark.django_db
from test_manager import login
def test_unlogged():
app = TestApp(application)
def test_unlogged(app):
assert urlparse.urlparse(app.get('/', status=302).location).path == '/login/'