tests: replace TestApp by classic app fixture (fixes #19900)
This commit is contained in:
parent
fb987b6133
commit
bab24b48c0
|
@ -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/'
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue