Skip to content

Commit 08153b2

Browse files
authored
More canonical URL tags (#17795)
* Always set a canonical URL tag * Update translations * Add a canonical URL for user profile pages * Update translations * Add a failing test * Add a custom canonical URL to org pages * Update translations * Handle more edge cases * Don't need this conditional anymore * Update translations
1 parent d654b8a commit 08153b2

File tree

7 files changed

+193
-157
lines changed

7 files changed

+193
-157
lines changed

tests/functional/test_org_profile.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
from http import HTTPStatus
14+
15+
from tests.common.db.organizations import OrganizationFactory
16+
17+
18+
def test_org_profile(webtest):
19+
# Create an org
20+
org = OrganizationFactory.create()
21+
assert org.name
22+
# ...and verify that the org's profile page exists
23+
resp = webtest.get(f"/org/{org.name}/")
24+
assert resp.status_code == HTTPStatus.OK

0 commit comments

Comments
 (0)