Merge pull request #695 from mouse-reeve/cover-alt-text

Removes the word "cover" from cover alt text
This commit is contained in:
Mouse Reeve 2021-03-05 08:51:39 -08:00 committed by GitHub
commit 79c3ae1c44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -91,7 +91,7 @@ class Book(BookDataModel):
@property
def alt_text(self):
''' image alt test '''
text = '%s cover' % self.title
text = '%s' % self.title
if self.edition_info:
text += ' (%s)' % self.edition_info
return text

View file

@ -81,7 +81,7 @@ class Book(TestCase):
book.save()
self.assertEqual(book.edition_info, 'worm, Glorbish language, 2020')
self.assertEqual(
book.alt_text, 'Test Edition cover (worm, Glorbish language, 2020)')
book.alt_text, 'Test Edition (worm, Glorbish language, 2020)')
def test_get_rank(self):

View file

@ -150,7 +150,7 @@ class Status(TestCase):
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
(settings.DOMAIN, self.book.cover.url))
self.assertEqual(
activity['attachment'][0].name, 'Test Edition cover')
activity['attachment'][0].name, 'Test Edition')
def test_comment_to_activity(self, _):
''' subclass of the base model version with a "pure" serializer '''
@ -177,7 +177,7 @@ class Status(TestCase):
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
(settings.DOMAIN, self.book.cover.url))
self.assertEqual(
activity['attachment'][0].name, 'Test Edition cover')
activity['attachment'][0].name, 'Test Edition')
def test_quotation_to_activity(self, _):
''' subclass of the base model version with a "pure" serializer '''
@ -207,7 +207,7 @@ class Status(TestCase):
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
(settings.DOMAIN, self.book.cover.url))
self.assertEqual(
activity['attachment'][0].name, 'Test Edition cover')
activity['attachment'][0].name, 'Test Edition')
def test_review_to_activity(self, _):
''' subclass of the base model version with a "pure" serializer '''
@ -238,7 +238,7 @@ class Status(TestCase):
self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \
(settings.DOMAIN, self.book.cover.url))
self.assertEqual(
activity['attachment'][0].name, 'Test Edition cover')
activity['attachment'][0].name, 'Test Edition')
def test_favorite(self, _):
''' fav a status '''