1
0
Fork 0

Merge branch 'main' into gts

This commit is contained in:
Hugh Rundle 2023-04-14 18:24:02 +10:00 committed by GitHub
commit a0b7112c9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 298 additions and 169 deletions

View file

@ -245,7 +245,7 @@ class ActivitypubMixins(TestCase):
# ObjectMixin
def test_object_save_create(self, *_):
"""should save uneventufully when broadcast is disabled"""
"""should save uneventfully when broadcast is disabled"""
class Success(Exception):
"""this means we got to the right method"""
@ -276,7 +276,7 @@ class ActivitypubMixins(TestCase):
ObjectModel(user=None).save()
def test_object_save_update(self, *_):
"""should save uneventufully when broadcast is disabled"""
"""should save uneventfully when broadcast is disabled"""
class Success(Exception):
"""this means we got to the right method"""

View file

@ -51,7 +51,7 @@ class BaseModel(TestCase):
def test_set_remote_id(self):
"""this function sets remote ids after creation"""
# using Work because it BookWrymModel is abstract and this requires save
# using Work because it BookWyrmModel is abstract and this requires save
# Work is a relatively not-fancy model.
instance = models.Work.objects.create(title="work title")
instance.remote_id = None

View file

@ -29,7 +29,7 @@ from bookwyrm.settings import DOMAIN
@patch("bookwyrm.activitystreams.populate_stream_task.delay")
@patch("bookwyrm.lists_stream.populate_lists_task.delay")
class ModelFields(TestCase):
"""overwrites standard model feilds to work with activitypub"""
"""overwrites standard model fields to work with activitypub"""
def test_validate_remote_id(self, *_):
"""should look like a url"""
@ -125,7 +125,7 @@ class ModelFields(TestCase):
instance.run_validators("@example.com")
instance.run_validators("mouse@examplecom")
instance.run_validators("one two@fish.aaaa")
instance.run_validators("a*&@exampke.com")
instance.run_validators("a*&@example.com")
instance.run_validators("trailingwhite@example.com ")
self.assertIsNone(instance.run_validators("mouse@example.com"))
self.assertIsNone(instance.run_validators("mo-2use@ex3ample.com"))
@ -292,7 +292,7 @@ class ModelFields(TestCase):
self.assertEqual(value.name, "MOUSE?? MOUSE!!")
def test_foreign_key_from_activity_dict(self, *_):
"""test recieving activity json"""
"""test receiving activity json"""
instance = fields.ForeignKey(User, on_delete=models.CASCADE)
datafile = pathlib.Path(__file__).parent.joinpath("../data/ap_user.json")
userdata = json.loads(datafile.read_bytes())

View file

@ -397,7 +397,7 @@ class Status(TestCase):
# pylint: disable=unused-argument
def test_create_broadcast(self, one, two, broadcast_mock, *_):
"""should send out two verions of a status on create"""
"""should send out two versions of a status on create"""
models.Comment.objects.create(
content="hi", user=self.local_user, book=self.book
)