- should use request.urlgen for location
import pytest
import mock
+pytest.importorskip("requests")
+
from mediagoblin import mg_globals
from mediagoblin.db.base import Session
from mediagoblin.tests.tools import get_app
if not location:
location=media.url_to_prev(request.urlgen)
if not location:
- location="mediagoblin.user_pages.user_home"
- return redirect(request, location=location, user=username)
+ location=request.urlgen("mediagoblin.user_pages.user_home",
+ user=username)
+ return redirect(request, location=location)
else:
messages.add_message(
request, messages.ERROR,