From e42143e00996aa21a35809b3047f136d2f143cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 18 Aug 2019 12:57:00 +0200 Subject: [PATCH] tests: don't check for invalid parameter decoding in python 3 (#35425) --- tests/test_public.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_public.py b/tests/test_public.py index 1ba02b38..11312658 100644 --- a/tests/test_public.py +++ b/tests/test_public.py @@ -12,6 +12,7 @@ from django.contrib.auth.models import User, Group from django.core.urlresolvers import reverse from django.db import connection from django.utils.http import quote +from django.utils import six from django.utils.six.moves.urllib import parse as urlparse from django.test import override_settings from django.test.utils import CaptureQueriesContext @@ -86,7 +87,8 @@ def test_mellon_login(app): assert urlparse.urlparse(resp.location).path == '/accounts/mellon/login/' resp = app.get('/login/?next=whatever') assert urlparse.urlparse(resp.location).query == 'next=whatever' - resp = app.get('/login/?next=%e0%40', status=400) + if six.PY2: + resp = app.get('/login/?next=%e0%40', status=400) def test_page_contents_group_presence(app, normal_user): group = Group(name='plop')