def test_get_bookmarklet_url_works(rf):
request = rf.get('/')
request.META['HTTP_HOST'] = 'boop.gov'
url = views.get_bookmarklet_url(request)
assert url.startswith('javascript:')
assert '"' not in url
assert 'https://boop.gov' in url
assert isinstance(url, SafeString)
评论列表
文章目录