mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
Fixes user model tests for new param
This commit is contained in:
parent
bfb29c0d74
commit
379db26300
1 changed files with 12 additions and 4 deletions
|
@ -162,7 +162,9 @@ class User(TestCase):
|
|||
json={"software": {"name": "hi", "version": "2"}},
|
||||
)
|
||||
|
||||
server = models.user.get_or_create_remote_server(DOMAIN)
|
||||
server = models.user.get_or_create_remote_server(
|
||||
DOMAIN, allow_external_connections=True
|
||||
)
|
||||
self.assertEqual(server.server_name, DOMAIN)
|
||||
self.assertEqual(server.application_type, "hi")
|
||||
self.assertEqual(server.application_version, "2")
|
||||
|
@ -173,7 +175,9 @@ class User(TestCase):
|
|||
responses.GET, f"https://{DOMAIN}/.well-known/nodeinfo", status=404
|
||||
)
|
||||
|
||||
server = models.user.get_or_create_remote_server(DOMAIN)
|
||||
server = models.user.get_or_create_remote_server(
|
||||
DOMAIN, allow_external_connections=True
|
||||
)
|
||||
self.assertEqual(server.server_name, DOMAIN)
|
||||
self.assertIsNone(server.application_type)
|
||||
self.assertIsNone(server.application_version)
|
||||
|
@ -187,7 +191,9 @@ class User(TestCase):
|
|||
)
|
||||
responses.add(responses.GET, "http://www.example.com", status=404)
|
||||
|
||||
server = models.user.get_or_create_remote_server(DOMAIN)
|
||||
server = models.user.get_or_create_remote_server(
|
||||
DOMAIN, allow_external_connections=True
|
||||
)
|
||||
self.assertEqual(server.server_name, DOMAIN)
|
||||
self.assertIsNone(server.application_type)
|
||||
self.assertIsNone(server.application_version)
|
||||
|
@ -201,7 +207,9 @@ class User(TestCase):
|
|||
)
|
||||
responses.add(responses.GET, "http://www.example.com", json={"fish": "salmon"})
|
||||
|
||||
server = models.user.get_or_create_remote_server(DOMAIN)
|
||||
server = models.user.get_or_create_remote_server(
|
||||
DOMAIN, allow_external_connections=True
|
||||
)
|
||||
self.assertEqual(server.server_name, DOMAIN)
|
||||
self.assertIsNone(server.application_type)
|
||||
self.assertIsNone(server.application_version)
|
||||
|
|
Loading…
Reference in a new issue