summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_views.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-07-09 03:03:03 -0700
committerGitHub <noreply@github.com>2020-07-09 12:03:03 +0200
commit5a3d7cf46205f42303a5f429c388cb507ef5d630 (patch)
tree19eebd48e8d93d83abef8781e148c24d86facc97 /tests/auth_tests/test_views.py
parent8a6df55f2dd5131282084a4edfd48f63fbf8c69a (diff)
Used urllib.parse.urljoin() in auth_tests to join URLs.
As the strings represent URLs and not paths, should use urllib to manipulate them.
Diffstat (limited to 'tests/auth_tests/test_views.py')
-rw-r--r--tests/auth_tests/test_views.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index 2f27fa7271..bb887e49ea 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -1,10 +1,9 @@
import datetime
import itertools
-import os
import re
from importlib import import_module
from unittest import mock
-from urllib.parse import quote
+from urllib.parse import quote, urljoin
from django.apps import apps
from django.conf import settings
@@ -1216,10 +1215,7 @@ class ChangelistTests(AuthViewsTestCase):
r'you can change the password using <a href="([^"]*)">this form</a>',
response.content.decode()
)[1]
- self.assertEqual(
- os.path.normpath(user_change_url + rel_link),
- os.path.normpath(password_change_url)
- )
+ self.assertEqual(urljoin(user_change_url, rel_link), password_change_url)
response = self.client.post(
password_change_url,