mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-14 05:29:43 +02:00
Fix linting errors
This commit is contained in:
parent
135192fd9f
commit
125877c4af
2 changed files with 2 additions and 7 deletions
|
@ -1,5 +1,3 @@
|
||||||
from urllib.parse import urljoin
|
|
||||||
|
|
||||||
from django import template
|
from django import template
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
@ -30,8 +28,5 @@ def public_site_url(url_path):
|
||||||
"""
|
"""
|
||||||
base_url = settings.GETGOV_PUBLIC_SITE_URL
|
base_url = settings.GETGOV_PUBLIC_SITE_URL
|
||||||
# join the two halves with a single slash
|
# join the two halves with a single slash
|
||||||
public_url ="/".join([
|
public_url = "/".join([base_url.rstrip("/"), url_path.lstrip("/")])
|
||||||
base_url.rstrip("/"),
|
|
||||||
url_path.lstrip("/")
|
|
||||||
])
|
|
||||||
return public_url
|
return public_url
|
||||||
|
|
|
@ -4,8 +4,8 @@ from django.conf import settings
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.template import Context, Template
|
from django.template import Context, Template
|
||||||
|
|
||||||
class TestTemplateTags(TestCase):
|
|
||||||
|
|
||||||
|
class TestTemplateTags(TestCase):
|
||||||
def _render_template(self, string, context=None):
|
def _render_template(self, string, context=None):
|
||||||
"""Helper method to render a template given as a string.
|
"""Helper method to render a template given as a string.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue