-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Urls redux #5978
base: main
Are you sure you want to change the base?
Urls redux #5978
Conversation
* Fix URLs * Fix where URLs are imported * Fix tests everywhere
This involved a lot of test changes, so warrants pretty close inspection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Let's though add an issue about it and add it in the current sprint so it can be thoroughly tested
Please do not merge - I am having another pass |
@@ -463,6 +463,7 @@ def immutable_file_test(path, url): | |||
}, | |||
] | |||
|
|||
APPEND_SLASH = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed
@@ -38,14 +38,14 @@ def test_visit_count_from_analytics(self, _build_request, close_old_connections) | |||
PAGEVIEWS_BY_DOCUMENT_RESPONSE = { | |||
"kind": "analytics#gaData", | |||
"rows": [ | |||
["/en-US/kb/hellỗ", "27"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the urls per app. One PR for one app and avoid adding multiple commits per app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd ask you to reconsider - this is a test in dashboards
that fails because of a setting change in the wiki
urls .
This PR is for wiki
url changes, and fixing what those changes break, which is tests in a four other apps. You need the wiki/urls.py
changes in place so your changed tests will work.
@@ -192,11 +192,11 @@ def test_internal_links(self): | |||
# Both internal links should link to the same article | |||
self.assertEqual( | |||
p.parse("[[%s]]" % doc.title), | |||
'<p><a href="/en-US/kb/%s">%s</a>\n</p>' % (doc.slug, doc.title), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this need changing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because
'<p><a href="/en-US/kb/real-article/">Real article</a>\n</p>' != '<p><a href="/en-US/kb/real-article">Real article</a>\n</p>'
- <p><a href="/en-US/kb/real-article/">Real article</a>
Eliminate URL warning/error spam at Django startup.