Include the correct protocol and port in remote IDs
This commit is contained in:
parent
609bc15406
commit
4f58b11330
21 changed files with 46 additions and 58 deletions
|
@ -27,7 +27,6 @@ class ViewsHelpers(TestCase):
|
|||
patch("bookwyrm.lists_stream.populate_lists_task.delay"),
|
||||
patch("bookwyrm.suggested_users.rerank_user_task.delay"),
|
||||
):
|
||||
|
||||
cls.local_user = models.User.objects.create_user(
|
||||
"rat",
|
||||
"rat@rat.com",
|
||||
|
@ -35,7 +34,6 @@ class ViewsHelpers(TestCase):
|
|||
local=True,
|
||||
discoverable=True,
|
||||
localname="rat",
|
||||
remote_id="https://your.domain.here/user/rat",
|
||||
)
|
||||
|
||||
with (
|
||||
|
|
|
@ -8,7 +8,7 @@ from django.test.client import RequestFactory
|
|||
|
||||
from bookwyrm import models, views
|
||||
from bookwyrm.tests.validate_html import validate_html
|
||||
from bookwyrm.settings import DOMAIN
|
||||
from bookwyrm.settings import BASE_URL
|
||||
|
||||
|
||||
class IsbnViews(TestCase):
|
||||
|
@ -55,7 +55,7 @@ class IsbnViews(TestCase):
|
|||
data = json.loads(response.content)
|
||||
self.assertEqual(len(data), 1)
|
||||
self.assertEqual(data[0]["title"], "Test Book")
|
||||
self.assertEqual(data[0]["key"], f"https://{DOMAIN}/book/{self.book.id}")
|
||||
self.assertEqual(data[0]["key"], f"{BASE_URL}/book/{self.book.id}")
|
||||
|
||||
def test_isbn_html_response(self):
|
||||
"""searches local data only and returns book data in json format"""
|
||||
|
|
|
@ -10,7 +10,7 @@ from django.test.client import RequestFactory
|
|||
|
||||
from bookwyrm import models, views
|
||||
from bookwyrm.book_search import SearchResult
|
||||
from bookwyrm.settings import DOMAIN
|
||||
from bookwyrm.settings import BASE_URL
|
||||
from bookwyrm.tests.validate_html import validate_html
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ class Views(TestCase):
|
|||
data = json.loads(response.content)
|
||||
self.assertEqual(len(data), 1)
|
||||
self.assertEqual(data[0]["title"], "Test Book")
|
||||
self.assertEqual(data[0]["key"], f"https://{DOMAIN}/book/{self.book.id}")
|
||||
self.assertEqual(data[0]["key"], f"{BASE_URL}/book/{self.book.id}")
|
||||
|
||||
def test_search_no_query(self):
|
||||
"""just the search page"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue